#ASAPOROE. 迷子の高橋君

迷子の高橋君

Score : 700700 points

Problem Statement

Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 00, and the coordinate of Takahashi is known to be xx, but his coordinate afterwards cannot be known to Aoki.

Time is divided into turns. In each turn, Aoki and Takahashi take the following actions simultaneously:

  • Let the current coordinate of Aoki be aa, then Aoki moves to a coordinate he selects from a1a-1, aa and a+1a+1.
  • Let the current coordinate of Takahashi be bb, then Takahashi moves to the coordinate b1b-1 with probability of pp percent, and moves to the coordinate b+1b+1 with probability of 100p100-p percent.

When the coordinates of Aoki and Takahashi coincide, Aoki can find Takahashi. When they pass by each other, Aoki cannot find Takahashi.

Aoki wants to minimize the expected number of turns taken until he finds Takahashi. Find the minimum possible expected number of turns.

Constraints

  • 11xx1,000,000,0001,000,000,000
  • 11pp100100
  • xx and pp are integers.

Partial Scores

  • In the test set worth 200200 points, p=100p=100.
  • In the test set worth 300300 points, xx1010.

Input

The input is given from Standard Input in the following format:

xx

pp

Output

Print the minimum possible expected number of turns. The output is considered correct if the absolute or relative error is at most 10610^{-6}.

3
100
2.0000000

Takahashi always moves by 1-1. Thus, by moving to the coordinate 11 in the 11-st turn and staying at that position in the 22-nd turn, Aoki can find Takahashi in 22 turns.

6
40
7.5000000
101
80
63.7500000