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;
const int maxn = 1e5 + 5;
int x, K;
double p;
double dp[205][2][255][258];
int count(int x) {
  vector<int> bit;
  while (x) {
    bit.push_back(x % 2);
    x = x / 2;
  }
  int cnt = 0;
  for (int i = 0; i < bit.size(); i++) {
    if (bit[i] == 1) break;
    cnt++;
  }
  return cnt;
}
int main() {
  scanf("%d %d %lf", &x, &K, &p);
  p = p / 100.0;
  memset(dp, 0, sizeof(dp));
  int cnt = 0;
  if (x & (1 << 8)) {
    for (int i = 30; i >= 8; i--)
      if (x & (1 << i))
        cnt++;
      else
        cnt = 0;
    dp[0][1][cnt][x % 256] = 1.0;
  } else {
    for (int i = 30; i >= 8; i--) {
      if (x & (1 << i)) cnt = i - 8;
    }
    dp[0][0][cnt][x % 256] = 1.0;
  }
  int np, nj, nk;
  for (int i = 0; i < K; i++) {
    for (int q = 0; q <= 1; q++) {
      for (int j = 0; j < 250; j++) {
        for (int k = 0; k < 256; k++) {
          if (q == 0) {
            if (k < 128)
              np = q, nk = k % 128 * 2, nj = j + 1;
            else
              np = 1, nk = k % 128 * 2, nj = 1;
          } else {
            if (k < 128)
              np = 0, nk = k % 128 * 2, nj = 1;
            else
              np = 1, nk = k % 128 * 2, nj = j + 1;
          }
          dp[i + 1][np][nj][nk] += dp[i][q][j][k] * p;
        }
        for (int k = 0; k < 255; k++)
          dp[i + 1][q][j][k + 1] += dp[i][q][j][k] * (1 - p);
        if (q == 0) {
          dp[i + 1][1][1][0] += dp[i][q][j][255] * (1 - p);
        } else {
          dp[i + 1][0][j][0] += dp[i][q][j][255] * (1 - p);
        }
      }
    }
  }
  double res = 0.0;
  for (int q = 0; q < 2; q++) {
    for (int j = 0; j < 250; j++) {
      for (int k = 0; k < 256; k++) {
        if (k != 0)
          res += dp[K][q][j][k] * count(k);
        else {
          if (q == 0)
            res += dp[K][q][j][k] * (8 + j);
          else
            res += dp[K][q][j][k] * 8;
        }
      }
    }
  }
  printf("%.12f\n", res);
  return 0;
}
