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;
int x, k, p;
double dp[201][256][235][2];
int low(int x) {
  int cnt = 0;
  while (x % 2 == 0) x /= 2, cnt++;
  return cnt;
}
int main() {
  scanf("%d %d %d", &x, &k, &p);
  p = 100 - p;
  for (int rem = 0; rem <= k; rem++) {
    for (int mod = 0; mod < 256; mod++) {
      for (int pw = 8; pw < k + 35; pw++) {
        for (int flag = 0; flag < 2; flag++) {
          if (!rem) {
            if (!mod)
              dp[rem][mod][pw][flag] = !flag ? 8 : pw;
            else
              dp[rem][mod][pw][flag] = low(mod);
          } else {
            if (!mod) {
              if (flag) {
                if (pw > 8)
                  dp[rem][mod][pw][flag] += dp[rem - 1][1][8][0] * p;
                else
                  dp[rem][mod][pw][flag] += dp[rem - 1][1][9][0] * p;
              } else
                dp[rem][mod][pw][flag] += dp[rem - 1][1][pw][0] * p;
              if (flag)
                dp[rem][mod][pw][flag] +=
                    dp[rem - 1][mod][pw + 1][flag] * (100 - p);
              else
                dp[rem][mod][pw][flag] += dp[rem - 1][mod][9][1] * (100 - p);
            } else {
              if (mod + 1 < 256)
                dp[rem][mod][pw][flag] += dp[rem - 1][mod + 1][pw][flag] * p;
              else
                dp[rem][mod][pw][flag] += dp[rem - 1][0][pw][1] * p;
              if (~mod & 128)
                dp[rem][mod][pw][flag] +=
                    dp[rem - 1][(mod << 1) & 255][8][flag] * (100 - p);
              else {
                if (mod == 128 and pw == 8)
                  dp[rem][mod][pw][flag] += dp[rem - 1][0][8][1] * (100 - p);
                else
                  dp[rem][mod][pw][flag] +=
                      dp[rem - 1][(mod << 1) & 255][pw + 1][flag] * (100 - p);
              }
            }
            dp[rem][mod][pw][flag] /= 100;
          }
        }
      }
    }
  }
  if (x >= 256 and low(x) > 8)
    printf("%.12lf\n", dp[k][0][low(x)][1]);
  else {
    int ptr = 8;
    while (x & (1 << ptr)) ptr++;
    printf("%.12lf\n", dp[k][x & 255][ptr][0]);
  }
  return 0;
}
