Code Submission Evaluation System Login

HIIT Open 2017

Start:2017-05-27 11:00:00
End:2017-05-27 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2017 - Epic set

Epic set

Time limit:0.50 s
Memory limit:512 MB

Let $E$ be a set that consists of all numbers of the form $2^k$ where $k$ is a positive integer less than $x^{x^x}$ and $x=123456789$.

Maija picks one number from $E$ uniformly at random. What is the probability that the first digit of the number is $a$ when the number is written in base $b$?

Input

The only input line contains two integers $a$ and $b$.

Output

Print one line that contains the probability. The difference between your answer and the correct answer has to be less than $10^{-6}$.

Constraints
Example

Input:
3 10

Output:
0.124938737