Each city is famous...#4543

Each city is famous...

0.1 seconds
8 megabytes
Very easy

"Roads aren't actually repaired,

but rather the potholes are relocated,

so that drivers find it harder to remember them."

Herb Shriner

The well-known saying about "fools and roads" is likely attributed to Nikolai Vasilyevich Gogol, who was born near the border of the Myrhorod and Poltava districts, almost at a crossroads, so to speak.

Last winter, roads became notorious in nearly every city across the country, and the events that unfolded in the spring align perfectly with the epigraph above.

If someone is eager to see their hometown featured in the "Famous Cities of Ukraine" section, they should select the "Roads" subsection and share a photo of the road from their hometown that they find most memorable... :)

Now, onto the task: On the journey from city to city , which spans kilometers, the probability of losing a wheel on any given km segment is . What is the probability of completing the entire trip while losing at least one wheel during the journey (i.e., being forced to purchase a new wheel), considering there is no spare tire in the trunk, as luck would have it?

Input

The input consists of a single line containing two numbers: the length of the road (0 \leq S \leq 1000, where is an integer) and the probability of losing a wheel on each kilometer of the route (0 \leq p \leq 1).

Output

Output a single number, which is the solution to the problem, with a precision of at least decimal places.

Examples

Example 1

Loading
Loading