Problem B
Income Tax Hazard (II)
Input: Standard Input

Output: Standard Output

 

The word tax makes us unhappy and if it is income tax it saddens us even more (have you ever wondered why many rich people leave their own country and stay in Switzerland). The strangest thing is that in many countries and states one has to pay income tax as well as sales tax.

 

Now you are in a strange new country, whose income tax structure is almost unknown to you. The things that you know about the salary/tax structure of this country are given below:

 

  1. Salary is always an integer but income tax may or may not be integer. Your salary is denoted with M.
  2. There are two slabs for income tax denoted by two integers S1 and S2. You have to pay 10% income tax for salary part above S1 and below (S2).
  3. You don’t have to pay any income tax for the salary below S1.
  4. For salary portion above S2 you will have to pay 20% income tax. So if S1=50000 and S2=100000 and your salary is 120000, then your total income tax will be 50000*0.10+20000*0.20=9000.
  5. The problem is, you don’t know the value of S1 and S2. Only thing you know is that the value of S1 and S2 is within two given integer values min and max (inclusive) and S1<=S2.

 

Now given the values of min, max and M you have two find the expected amount of income tax that you need to pay. You should assume that all distinct combinations of S1 and S2 satisfying the above conditions are equally likely.

 

Input

The input file contains around 10000 line of input. Each line contains three integers M (0 < M ≤ 400000), min and max (50000 ≤ min ≤ max ≤ 200000). Their meaning is given in the problem statement above. Input will be terminated with three zeroes in a single line.

Output

For each line of input produce one line of output. This line contains the serial of output followed by a floating-point number which denotes the expected amount of income. This floating-point number should be rounded to two digits after decimal point.

Sample Input                              Output for Sample Input

10000 50000 50002

70000 50000 80000

0 0 0

 

Case 1: 0.00

Case 2: 1333.36


Problem Setter: Shahriar Manzoor

Special Thanks: Derek Kisman