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;
const double eps = 1e-12;
const int MOD = 256;
double dp[300][300][2][2];
double p;
int x, n, q;
int main() {
  scanf("%d%d%d", &x, &n, &q);
  p = (double)q / 100.;
  int y = x >> 8;
  x %= MOD;
  int z = 0;
  q = y & 1;
  if (y > 0) {
    while ((y & 1) == q) {
      z++;
      y /= 2;
    }
  }
  dp[x][z][q][0] = 1.;
  while (n--) {
    for (int mask = 0; mask < MOD; mask++)
      for (int k = 0; k < 300; k++)
        for (int q = 0; q < 2; q++) {
          if (dp[mask][k][q][0] < eps) continue;
          int x = mask * 2;
          int y = x / MOD;
          x %= MOD;
          if (y == q)
            dp[x][k + 1][q][1] += dp[mask][k][q][0] * p;
          else
            dp[x][1][y][1] += dp[mask][k][q][0] * p;
          if (mask == MOD - 1) {
            if (q == 0)
              dp[0][1][1][1] += dp[mask][k][q][0] * (1. - p);
            else
              dp[0][k][0][1] += dp[mask][k][q][0] * (1. - p);
          } else {
            dp[mask + 1][k][q][1] += dp[mask][k][q][0] * (1. - p);
          }
        }
    for (int mask = 0; mask < MOD; mask++)
      for (int k = 0; k < 300; k++)
        for (int q = 0; q < 2; q++) {
          dp[mask][k][q][0] = dp[mask][k][q][1];
          dp[mask][k][q][1] = 0.;
        }
  }
  double ans = 0.;
  for (int i = 1; i < 300; i++) ans += (double)i * dp[0][i][0][0];
  for (int mask = 0; mask < MOD; mask++) {
    int x = 0;
    while (x < 8 && (mask & (1 << x)) == 0) x++;
    for (int k = 0; k < 300; k++)
      for (int q = 0; q < 2; q++) ans += dp[mask][k][q][0] * (double)x;
  }
  printf("%.10lf\n", ans);
  return 0;
}