Code Submission Evaluation System Login

KILO 2018 5/5

Start:2018-10-04 16:30:00
End:2018-10-04 18:30:00
 

Tasks | Scoreboard | Statistics


CSES - KILO 2018 5/5 - GamblingCSES - Gambling

Gambling

Time limit:1.00 s
Memory limit:128 MB

Uolevi is playing a game with a dice. The game consists of $n$ turns. Initially Uolevi has $c$ coins. On each turn Uolevi throws a dice with $s$ sides. The sides contain numbers from $1$ to $s$. If the number on the top of the dice is at least $p$, Uolevi wins $w$ coins. Otherwise Uolevi loses $1$ coin. If Uolevi loses all his coins, he can't play anymore.

What is the probability that Uolevi has more coins in the end than in the beginning?

Input

The first and only line of the input contains integers $n$, $c$, $s$, $p$ and $w$.

Output

Output a decimal number between $0 \ldots 1$: the probability that Uolevi has more coins in the end than in the beginning.

Your output is correct if the absolute error is less than $10^{-8}$. In C++ you can use the following code to output the answer (where p is the probability):
cout<<setprecision(15)<<p;
In Java you can use the normal output method (println).

Constraints
Example

Input:
2 1 2 2 1

Output:
0.25