CODE FESTIVAL 2016 Elimination Tournament Round 2 (Parallel) - Takahashi is Missing!

Aoki is in search of Takahashi, who is missing in a one-dimentional world. Initially, the coordinate of Aoki is 0, and the coordinate of Takahashi is known to be x, 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 a, then Aoki moves to a coordinate he selects from a-1, a and a+1.

* Let the current coordinate of Takahashi be b, then Takahashi moves to the coordinate b-1 with probability of p percent, and moves to the coordinate b+1 with probability of 100-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

* 1 ≦ x ≦ 1,000,000,000
* 1 ≦ p ≦ 100
* x and p are integers.

Input

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


x
p


Output

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

Examples

Input

3
100


Output

2.0000000


Input

6
40


Output

7.5000000


Input

101
80


Output

63.7500000

Source: atcoder | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
import math
x = int(input())
p = int(input()) / 100
print(math.ceil(x / 2) / p)


print((int(input()) + 1) // 2 / int(input()) * 100)


x = int(input())
p = int(input()) / 100
print((x + 1) // 2 / p)


x = int(input())
p = int(input())
if x % 2 == 0:
	print(100 * (x // 2) / p)
else:
	print(100 * (x // 2 + 1) / p)


x = int(input())
p = int(input())
l = p / 100

def f(d):
	return d / 2 * 100 / p
if x % 2 == 0:
	res = f(x)
else:
	res = 1 + l * f(x - 1) + (1 - l) * f(x + 1)
print(res)


x = int(input())
p = int(input())
p *= 0.01
print((x + 1) // 2 / p)


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
(X, P) = map(int, read().split())

def f(x):
	y = x // 2
	return y * 100 / P
if X % 2 == 0:
	answer = f(X)
else:
	answer = 1 + (P * f(X - 1) + (100 - P) * f(X + 1)) / 100
print(answer)


from sys import exit, setrecursionlimit
from functools import reduce
from itertools import *
from collections import defaultdict
from bisect import bisect

def read():
	return int(input())

def reads():
	return [int(x) for x in input().split()]
setrecursionlimit(1000000)
x = read()
p = read()
p *= 0.01
if x % 2 == 0:
	print(x // 2 / p)
else:
	y = x // 2
	print(1 + p * y / p + (1 - p) * (y + 1) / p)


x = int(input())
p = int(input())
print('%.016f\n' % ((x + x % 2) / 2 * 100 / p))


N = int(input())
M = int(input())
if N % 2:
	print(1 + (N - 1) / 2 + (100 - M) * (N + 1) / 2 / M)
else:
	print(N * 50 / M)