Expected Allowance#5787

Expected Allowance

1 second
64 megabytes
Very hard

Hideyuki is allowed by his father Ujisato some yen bills every month for his pocket money. In the first day of every month, the number of bills is decided as follows. Ujisato prepares pieces of -sided dice and declares the cutback . Hideyuki rolls these dice. The number of bills given is the sum of the spots of the rolled dice decreased by the cutback. Fortunately to Hideyuki, Ujisato promises him to give at least one bill, even if the sum of the spots does not exceed the cutback. Each of the dice has spots of through inclusive on each side, and the probability of each side is the same.

In this problem, you are asked to write a program that finds the expected value of the number of given bills.

For example, when n = 2, m = 6 and k = 3, the probabilities of the number of bills being , , , , , , , and are as shown in the formulas above, respectively.

Therefore, the expected value is

which is approximately .

Input

The input is a sequence of lines each of which contains three integers , and in this order. They satisfy the following conditions.

1 \leq n

2 \leq m

0 \leq k < nm

nm \times m^n < 100000000 (10^8)

The end of the input is indicated by a line containing three zeros.

Output

The output should be comprised of lines each of which contains a single decimal fraction. It is the expected number of bills and may have an error less than 10^{-7}. No other characters should occur in the output.

Examples

Example 1

Loading
Loading