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 int MAXN = 256;
const int MAXT = 230;
double dp[205][2][MAXT][MAXN];
int cal(int j) {
  int cnt = 0;
  if (j == 0) return 0;
  while (j % 2 == 0) {
    cnt++;
    j /= 2;
  }
  return cnt;
}
int main() {
  int x, k, p;
  while (~scanf("%d %d %d", &x, &k, &p)) {
    double pb2 = (double)p / 100.0;
    double pb1 = 1.0 - pb2;
    for (int i = 0; i <= k; i++)
      for (int t = 0; t < 2; t++)
        for (int j = 0; j < MAXT; j++)
          for (int m = 0; m < MAXN; m++) dp[i][t][j][m] = 0.0;
    int rem = x % 256;
    if (rem) {
      x /= 256;
      int cnt = 0;
      while (x & 1) {
        x >>= 1;
        cnt++;
      }
      dp[0][1][cnt][rem] = 1.0;
    } else {
      int cnt = 0;
      while (x % 2 == 0) {
        x /= 2;
        cnt++;
      }
      dp[0][0][cnt - 7][0] = 1.0;
    }
    for (int i = 0; i < k; i++)
      for (int t = 0; t < 2; t++)
        for (int j = 0; j < 230; j++)
          for (int m = 0; m < MAXN; m++) {
            double cur = dp[i][t][j][m];
            if (t == 0) {
              dp[i + 1][t][j + 1][m] += cur * pb2;
              dp[i + 1][1][0][1] += cur * pb1;
              break;
            } else {
              if (j >= 200) break;
              if (m == 128)
                dp[i + 1][0][1][0] += cur * pb2;
              else if (m > 128)
                dp[i + 1][t][j + 1][(m * 2 - 256)] += cur * pb2;
              else if (m == 0 && j)
                dp[i + 1][0][2][0] += cur * pb2;
              else
                dp[i + 1][t][0][m * 2] += cur * pb2;
              if (m == 255)
                dp[i + 1][0][j + 1][0] += cur * pb1;
              else
                dp[i + 1][t][j][m + 1] += cur * pb1;
            }
          }
    double ans = 0.0;
    for (int t = 0; t < 2; t++)
      for (int j = 0; j < MAXT; j++) {
        if (t == 0 && j) {
          ans += dp[k][t][j][0] * (j + 7);
        } else {
          for (int m = 1; m < MAXN; m++) {
            ans += dp[k][t][j][m] * cal(m);
          }
        }
      }
    printf("%.13lf\n", ans);
  }
  return 0;
}