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;
double d[210][260][2][260];
int a[15];
int main() {
  int x, k, p, h = 0;
  memset(d, 0, sizeof(d));
  memset(a, 0, sizeof(a));
  scanf("%d%d%d", &x, &k, &p);
  while (x) {
    a[h++] = x % 2;
    x /= 2;
  }
  int now = 0;
  for (int i = 0; i < 8; ++i)
    if (a[i]) now += (1 << i);
  if (h < 9) {
    d[0][now][0][0] = 1;
  } else {
    int cnt = 1;
    for (int i = 9; i < h; ++i) {
      if (a[i] != a[i - 1]) break;
      cnt++;
    }
    d[0][now][a[8]][cnt] = 1;
  }
  for (int i = 0; i < k; ++i) {
    for (int j = 0; j <= 255; ++j) {
      for (int x = 0; x <= 250; ++x) {
        if (j != 255) {
          d[i + 1][j + 1][0][x] += d[i][j][0][x] * (100 - p) / 100.0;
          d[i + 1][j + 1][1][x] += d[i][j][1][x] * (100 - p) / 100.0;
        } else {
          d[i + 1][0][0][x] += d[i][j][1][x] * (100 - p) / 100.0;
          d[i + 1][0][1][1] += d[i][j][0][x] * (100 - p) / 100.0;
        }
        if (j & (1 << 7)) {
          d[i + 1][(j << 1) % 256][1][1] += d[i][j][0][x] * p / 100.0;
          d[i + 1][(j << 1) % 256][1][x + 1] += d[i][j][1][x] * p / 100.0;
        } else {
          d[i + 1][(j << 1) % 256][0][1] += d[i][j][1][x] * p / 100.0;
          d[i + 1][(j << 1) % 256][0][x + 1] += d[i][j][0][x] * p / 100.0;
        }
      }
    }
  }
  double sum = 0;
  for (int i = 1; i < 255; ++i) {
    for (int j = 0; j < 2; ++j)
      for (int x = 0; x <= 250; ++x) {
        int now = i;
        int cnt = 0;
        while (now % 2 == 0) {
          cnt++;
          now /= 2;
        }
        sum += d[k][i][j][x] * cnt;
      }
  }
  for (int x = 0; x <= 250; ++x) sum += d[k][0][1][x] * 8;
  for (int x = 0; x <= 250; ++x) sum += d[k][0][0][x] * (x + 8);
  printf("%.10lf\n", sum);
  return 0;
}
