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;
int f1(int x) {
  int t = (x & 0xff) + 1, n = (x >> 8) & 0xff, w = x >> 16, i;
  int rc;
  if (t < 0x100)
    rc = (w << 16) | (n << 8) | t;
  else if (w)
    rc = (n << 8) | (t & 0xff);
  else
    rc = 0x10100 | (t & 0xff);
  return rc;
}
int f2(int x) {
  int t = (x & 0xff) << 1, n = (x >> 8) & 0xff, w = x >> 16, i;
  int rc;
  if (t < 0x100)
    rc = w ? 0x100 | t : ((n + 1) << 8) | t;
  else if (w)
    rc = 0x10000 | ((n + 1) << 8) | (t & 0xff);
  else
    rc = 0x10100 | (t & 0xff);
  return rc;
}
double A[2][0x20000];
int F1[0x20000], F2[0x20000];
int main() {
  int x, k, p, i, j, n, n1, w, t, t1;
  double u, v, ans;
  for (i = 0; i < 0x20000; i++) {
    F1[i] = f1(i);
    F2[i] = f2(i);
  }
  scanf("%u%u%u", &x, &k, &p);
  u = (double)p / 100.0;
  v = 1.0 - u;
  w = (x & 0x100) >> 8;
  t = x & 0xff;
  x >>= 8;
  if (w)
    for (n = 0; x & 1; x >>= 1) n++;
  else
    for (n = 1, x >>= 1; x > 0 && ((x & 1) == 0); x >>= 1) n++;
  x = (w << 16) | (n << 8) | t;
  A[0][x] = 1.0;
  for (i = 0; i < k; i++) {
    for (j = 0; j < 0x20000; j++) A[1 - (i & 1)][j] = 0.0;
    for (j = 0; j < 0x20000; j++) {
      A[1 - (i & 1)][F1[j]] += v * A[i & 1][j];
      A[1 - (i & 1)][F2[j]] += u * A[i & 1][j];
    }
  }
  for (ans = 0.0, w = 0; w < 2; w++)
    for (n = 0; n < 256; n++)
      for (t = 0; t < 256; t++) {
        if (t == 0 && w == 0)
          n1 = n + 8;
        else
          for (n1 = 0, t1 = 0x100 | t; (t1 & 1) == 0; t1 >>= 1) n1++;
        ans += A[k & 1][(w << 16) | (n << 8) | t] * n1;
      }
  printf("%.8lf\n", ans);
  return 0;
}