A. Random Mood
time limit per test
0.25 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

This is a training contest on matrix exponentiation. See the tutorial along with hints and video solutions here.

Limak is always either happy or sad. His mood switches with probability $$$p$$$ every second. If Limak is happy right now, what is the probability that he's happy after $$$n$$$ seconds?

Input

An integer $$$n$$$ ($$$1 \leq n \leq 10^9$$$) and a real value $$$p$$$ ($$$0 < p < 1$$$) with at most 9 digits after floating point.

Output

Print one line with the answer. The absolute error allowed is $$$10^{-6}$$$.

Examples
Input
1 0.7
Output
0.3000000000
Input
2 0.1
Output
0.8200000000
Input
11 0.06
Output
0.6225404294
Note

In the first sample test, there's probability $$$0.7$$$ that Limak changes his mood from happy to sad. Otherwise (with probability $$$0.3$$$), he stays happy.

In the second sample test, the answer is $$$0.1 \cdot 0.1 + 0.9 \cdot 0.9 = 0.82$$$ because we want Limak either to switch his mood twice or not to change the mood at all.