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 X, K, P;
double dp[203][260][2][260];
int main() {
  scanf("%d%d%d", &X, &K, &P);
  double prob = 0.01 * P;
  int bm = X & 255;
  int last = (X >> 8) & 1;
  int tmp = X >> 8;
  int cnt = 0;
  while (tmp && (tmp & 1) == last) {
    ++cnt;
    tmp >>= 1;
  }
  dp[0][bm][last][cnt] = 1.0;
  for (int k = 0; k < K; ++k) {
    for (int i = 0; i < 256; ++i) {
      for (int j = 0; j < 2; ++j) {
        for (int cnt = 0; cnt < 240; ++cnt) {
          int new_bm = i << 1;
          int new_cnt, new_last;
          if (new_bm & 256) {
            new_last = 1;
            if (j == 1) {
              new_cnt = cnt + 1;
            } else {
              new_cnt = 1;
            }
          } else {
            new_last = 0;
            if (j == 1) {
              new_cnt = 1;
            } else {
              new_cnt = (cnt == 0 ? 0 : cnt + 1);
            }
          }
          new_bm &= 255;
          dp[k + 1][new_bm][new_last][new_cnt] += prob * dp[k][i][j][cnt];
          new_bm = i + 1;
          if (new_bm & 256) {
            if (j == 1) {
              new_last = 0;
              new_cnt = cnt;
            } else {
              new_last = 1;
              new_cnt = 1;
            }
          } else {
            new_last = j;
            new_cnt = cnt;
          }
          new_bm &= 255;
          dp[k + 1][new_bm][new_last][new_cnt] +=
              (1.0 - prob) * dp[k][i][j][cnt];
        }
      }
    }
  }
  double ans = 0;
  for (int i = 0; i < 256; ++i) {
    for (int j = 0; j < 2; ++j) {
      for (int cnt = 0; cnt < 240; ++cnt) {
        int val = 0;
        if (j == 1 || i & 255) {
          if (i & 255) {
            int lsb = i & ((~i) + 1);
            while (lsb > 1) {
              ++val;
              lsb >>= 1;
            }
          } else
            val = 8;
        } else {
          val = (cnt > 0 ? cnt + 8 : 0);
        }
        ans += dp[K][i][j][cnt] * val;
      }
    }
  }
  printf("%.12lf\n", ans);
  return 0;
}