Fence Repairing
You are going to repair an old fence. The fence consists of several consecutive boards, some of which are broken and some of which are fine. The boards are numbered from left to right in increasing order. To repair all the boards between and , inclusive, where is greater than or equal to , a woodworker charges . Due to the woodworker's pricing scheme, it is often necessary to repair boards even if they are not broken in order to get the best price.
You will be given the information about the fence. Broken boards are represented by "X" characters and good boards are represented by "." characters. Find the minimal cost required to repair all broken boards.
Input
Each line is a separate test that represents the fence. It contains the characters "X" and "." only. The length of each fence is no more than symbols.
Output
For each test case in a separate line print the minimal cost required to repair all broken boards with digits after the decimal point.