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 i, j, k, n, m, u;
double p, f[210][270][250][2], x;
int main() {
  scanf("%d%d%lf", &n, &m, &p);
  p = 1. * p / 100;
  int A = n & 255, B = n / 256, C = 0;
  if (B & 1) {
    for (i = 0; i <= 40; i++)
      if (B >> i & 1)
        C++;
      else
        break;
    f[0][A][C][1] = 1;
  } else {
    for (i = 0; i <= 40; i++)
      if (!(B >> i & 1))
        C++;
      else
        break;
    if (!B) C = 0;
    f[0][A][C][0] = 1;
  }
  for (i = 1; i <= m; i++)
    for (j = 0; j <= 255; j++)
      for (k = 0; k <= 240; k++)
        for (u = 0; u <= 1; u++)
          if (x = f[i - 1][j][k][u]) {
            int a = j * 2, b = a / 256, c = a & 255;
            if (b) {
              if (!u)
                f[i][c][1][1] += x * p;
              else
                f[i][c][k + 1][1] += x * p;
            } else {
              if (!u)
                f[i][c][k + 1][0] += x * p;
              else
                f[i][c][1][0] += x * p;
            }
            a = j + 1, b = a / 256, c = a & 255;
            if (b) {
              if (!u)
                f[i][c][1][1] += x * (1 - p);
              else
                f[i][c][k][0] += x * (1 - p);
            } else
              f[i][c][k][u] += x * (1 - p);
          }
  double an = 0;
  for (i = 0; i <= 255; i++)
    for (j = 0; j <= 240; j++) {
      for (k = 0; k <= 7; k++)
        if (i >> k & 1) break;
      an += f[m][i][j][1] * k;
      if (k == 8)
        an += f[m][i][j][0] * (k + j);
      else
        an += f[m][i][j][0] * k;
    }
  printf("%.11lf\n", an);
  return 0;
}