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;
int x, n, p;
double p1, p2;
double ans;
double f[201][259][259][2];
inline bool xlow(int x, int t) { return (x & (1 << t - 1)) != 0; }
int number(int x, int l) {
  bool t = xlow(x, l);
  int nn = 0;
  while (xlow(x, l) == t) {
    l++;
    nn++;
  }
  return nn;
}
int len(int j, int k, int c) {
  if (j == 0) {
    if (c == 0)
      return 7 + k;
    else
      return 8;
  }
  for (int ii = 1; ii <= 8; ii++)
    if (xlow(j, ii)) return ii - 1;
}
int main() {
  scanf("%d%d%d", &x, &n, &p);
  p2 = p / 100.0;
  p1 = 1 - p2;
  if (!xlow(x, 8) && xlow(x, 9))
    f[0][x & 255][number(x, 9)][1] = 1;
  else
    f[0][x & 255][number(x, 8)][0] = 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j <= 255; j++)
      for (int k = 1; k <= 232; k++)
        for (int c = 0; c <= 1; c++) {
          if (f[i][j][k][c] == 0) continue;
          int jj, kk, cc;
          jj = j + 1;
          if (xlow(jj, 8) && c == 1) {
            cc = 0;
            kk = k + 1;
          }
          if (xlow(jj, 8) && c == 0) {
            cc = 0;
            if (xlow(j, 8))
              kk = k;
            else
              kk = 1;
          }
          if (!xlow(jj, 8) && c) {
            cc = 1;
            kk = k;
          }
          if (!xlow(jj, 8) && !c) {
            cc = 0;
            kk = k;
          }
          jj &= 255;
          f[i + 1][jj][kk][cc] += f[i][j][k][c] * p1;
          jj = j * 2;
          if (!xlow(j, 8) && c == 1) {
            cc = 0;
            kk = !xlow(j, 7) + 1;
          }
          if (!xlow(j, 8) && c == 0) {
            cc = 0;
            if (!xlow(j, 7))
              kk = k + 1;
            else
              kk = 1;
          }
          if (xlow(j, 8)) {
            if (!xlow(j, 7)) {
              kk = k;
              cc = 1;
            } else {
              cc = 0;
              kk = k + 1;
            }
          }
          jj &= 255;
          f[i + 1][jj][kk][cc] += f[i][j][k][c] * p2;
        }
  for (int j = 0; j <= 255; j++)
    for (int k = 1; k <= 240; k++)
      for (int c = 0; c <= 1; c++)
        if (f[n][j][k][c] > 0) ans += f[n][j][k][c] * len(j, k, c);
  printf("%.16f\n", ans);
}
