eolymp
bolt
Try our new interface for solving problems
Problems

Difficult path

Difficult path

Alex drank a lot this night and now when he reached his street, he has completely lost the sense of direction. Since he can not remember where his house is, he chooses direction randomly. Moreover, at every crossroads there is a 50\% chance that he will keep going forward or turn around and go back. He so lost his touch with reality that he can even walk past his own house and not notice it! Having passed $n$ blocks, Alex falls asleep right on the street. When he wakes up, he wonders what were the chances that he slept near his house? From the crossroads, where he started his way to the crossroads near his house there are $m$ blocks. Help him. \InputFile One line contains two integers $n$ and $m~(1 \le n, m \le 1000)$. \OutputFile Print one number --- Alex's chances to fall asleep at the crossroads right next to his house. Print the result with error not grater than $10^{-7}$.
Time limit 1 second
Memory limit 256 MiB
Input example #1
1 1
Output example #1
0.500000000
Input example #2
10 20
Output example #2
0.000000000
Input example #3
1000 100
Output example #3
0.000169397
Author Евгений Капун
Source Зимняя школа по программированию 2014, Харьков