Valera is a coder. Recently he wrote a funny program. The pseudo code for this program is given below:
    
    
      
    //input: integers x, k, p  
    a = x;  
    for(step = 1; step <= k; step = step + 1){  
        rnd = [random integer from 1 to 100];  
        if(rnd <= p)  
            a = a * 2;  
        else  
            a = a + 1;  
    }  
      
    s = 0;  
      
    while(remainder after dividing a by 2 equals 0){  
        a = a / 2;  
        s = s + 1;  
    }  
      
    

Now Valera wonders: given the values x, k and p, what is the expected value of the resulting number s?

Input

The first line of the input contains three integers x, k, p (1 ≤ x ≤ 109; 1 ≤ k ≤ 200; 0 ≤ p ≤ 100).

Output

Print the required expected value. Your answer will be considered correct if the absolute or relative error doesn't exceed 10 - 6.

Examples

Input

1 1 50


Output

1.0000000000000


Input

5 3 0


Output

3.0000000000000


Input

5 3 25


Output

1.9218750000000

Note

If the concept of expected value is new to you, you can read about it by the link: 

http://en.wikipedia.org/wiki/Expected_value
#include <bits/stdc++.h>
using namespace std;
long long x, K, p;
double dp[2][1 << 10][2][250];
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> x >> K >> p;
  long long q = (100 - p);
  if (x < 1024) x |= (1 << 13);
  if (x >> 10 & 1) {
    long long cnt = 0;
    for (long long j = 10; j < 31; j++)
      if (x >> j & 1)
        cnt++;
      else
        break;
    dp[0][x % 1024][1][cnt] = 1;
  } else {
    long long cnt = 0;
    for (long long j = 10; j < 31; j++)
      if ((x >> j & 1) == 0)
        cnt++;
      else
        break;
    dp[0][x % 1024][0][cnt] = 1;
  }
  for (long long i = 0; i < K; i++) {
    for (long long mask = 0; mask < 1024; mask++) {
      for (long long cnt = 1; cnt <= 240; cnt++) {
        dp[!(i & 1)][mask][0][cnt] = dp[!(i & 1)][mask][1][cnt] = 0;
      }
    }
    for (long long mask = 0; mask < 1024; mask++) {
      for (long long cnt = 1; cnt <= 240; cnt++) {
        long long mul = mask * 2, add = mask + 1;
        if (mul < 1024) {
          dp[!(i & 1)][mul][0][cnt + 1] += dp[i & 1][mask][0][cnt] * p / 100;
          dp[!(i & 1)][mul][0][1] += dp[i & 1][mask][1][cnt] * p / 100;
        } else {
          dp[!(i & 1)][mul % 1024][1][cnt + 1] +=
              dp[i & 1][mask][1][cnt] * p / 100;
          dp[!(i & 1)][mul % 1024][1][1] += dp[i & 1][mask][0][cnt] * p / 100;
        }
        if (add < 1024) {
          dp[!(i & 1)][add][0][cnt] += dp[i & 1][mask][0][cnt] * q / 100;
          dp[!(i & 1)][add][1][cnt] += dp[i & 1][mask][1][cnt] * q / 100;
        } else {
          dp[!(i & 1)][add % 1024][1][1] += dp[i & 1][mask][0][cnt] * q / 100;
          dp[!(i & 1)][add % 1024][0][cnt] += dp[i & 1][mask][1][cnt] * q / 100;
        }
      }
    }
  }
  double ans = 0;
  for (long long mask = 0; mask < 1024; mask++) {
    if (mask == 0) {
      for (long long cnt = 1; cnt <= 240; cnt++) {
        ans += dp[K & 1][mask][0][cnt] * (cnt + 10);
        ans += dp[K & 1][mask][1][cnt] * 10;
      }
      continue;
    }
    long long c = 0;
    long long temp = mask;
    while (temp % 2 == 0) temp /= 2, c++;
    for (long long cnt = 0; cnt <= 240; cnt++) {
      ans += dp[K & 1][mask][0][cnt] * c;
      ans += dp[K & 1][mask][1][cnt] * c;
    }
  }
  cout << fixed << setprecision(15) << ans << '\n';
}
