Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int size = 3111;
long long mod = 200000007;
double p;
int x, k, tmpx, a, m, b;
double dp[2][1 << 9][2][255];
int main() {
  cin >> x >> k >> p;
  tmpx = x;
  p /= 100;
  int cur, nxt;
  m = (1 << 9) - 1;
  int res = (x & m);
  x >>= 9;
  if (x & 1) {
    a = 0;
    while (x & 1) {
      a++;
      x >>= 1;
    }
    dp[0][res][1][a] = 1;
  } else {
    a = 0;
    while (x > 0 && !(x & 1)) {
      a++;
      x >>= 1;
    }
    dp[0][res][0][a] = 1;
  }
  x = tmpx;
  for (int i = 0; i < k; i++) {
    cur = i % 2;
    nxt = (i + 1) % 2;
    for (int i = 0; i < (1 << 9); i++) {
      if (i + 1 <= m) {
        for (int k = 0; k < 250; k++) {
          dp[nxt][i + 1][0][k] += (1 - p) * dp[cur][i][0][k];
          dp[nxt][i + 1][1][k] += (1 - p) * dp[cur][i][1][k];
        }
      } else {
        for (int k = 0; k < 250; k++) {
          dp[nxt][0][1][1] += (1 - p) * dp[cur][i][0][k];
          dp[nxt][0][0][k] += (1 - p) * dp[cur][i][1][k];
        }
      }
      if (i * 2 <= m) {
        for (int k = 0; k < 250; k++) {
          dp[nxt][i * 2][0][1] += p * dp[cur][i][1][k];
          dp[nxt][i * 2][0][k + 1] += p * dp[cur][i][0][k];
        }
      } else {
        a = i * 2;
        a &= m;
        for (int k = 0; k < 250; k++) {
          dp[nxt][a][1][1] += p * dp[cur][i][0][k];
          dp[nxt][a][1][k + 1] += p * dp[cur][i][1][k];
        }
      }
    }
    for (int i = 0; i <= m; i++)
      for (int k = 0; k < 250; k++) dp[cur][i][0][k] = dp[cur][i][1][k] = 0;
  }
  double ans = 0;
  for (int i = 1; i <= m; i++) {
    a = 0;
    b = i;
    while (!(b & 1)) {
      b >>= 1;
      a++;
    }
    for (int k = 0; k < 250; k++)
      ans += (dp[nxt][i][0][k] + dp[nxt][i][1][k]) * a;
  }
  for (int k = 0; k < 250; k++) {
    ans += dp[nxt][0][0][k] * (k + 9);
    ans += dp[nxt][0][1][k] * 9;
  }
  printf("%.8lf\n", ans);
}