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;
long long x, n;
double p, p1, p2, f[205][(1 << 8) + 10][256][2];
long long read() {
  long long f = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    f = f * 10 + ch - '0';
    ch = getchar();
  }
  return f * w;
}
void init() {
  long long z = (x >> 8);
  long long bit = z & 1;
  long long cnt = 0;
  while (z && ((z & 1) == bit)) {
    z >>= 1, ++cnt;
  }
  f[0][x & 255][cnt][bit] = 1.0;
}
signed main() {
  cin >> x >> n >> p;
  p1 = 0.01 * p;
  p2 = 1.00 - p1;
  init();
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j <= 255; j++) {
      for (long long k = 0; k < 232; k++) {
        for (long long l = 0; l <= 1; l++) {
          double now = f[i][j][k][l];
          long long wei = (j >> 7) & 1;
          long long tot = (l == wei) ? (k + 1) : 1;
          f[i + 1][(j << 1) & 255][tot][wei] += now * p1;
          wei = (j == 255) ? (!l) : l;
          tot = ((j == 255) && (!l)) ? 1 : k;
          f[i + 1][(j + 1) & 255][tot][wei] += now * p2;
        }
      }
    }
  }
  double ans = 0.0;
  for (long long i = 0; i <= 255; i++) {
    for (long long j = 0; j < 232; j++) {
      for (long long k = 0; k <= 1; k++) {
        ans += f[n][i][j][k] * (i ? __builtin_ctz(i) : 8 + (k ? 0 : j));
      }
    }
  }
  printf("%.13lf\n", ans);
  return 0;
}