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;
double dp[2][2][250][280];
inline int val(int st) {
  int cnt = 0;
  for (int i = 0; i < 8; ++i, ++cnt)
    if (st & (1 << i)) break;
  return cnt;
}
int main() {
  int x, K, p;
  scanf("%d%d%d", &x, &K, &p);
  double mul = 1.0 * p / 100, add = 1 - mul;
  int fg = (x >> 8) & 1, cnt = 1;
  for (int i = 9;; ++i) {
    if ((x >> i) == 0) break;
    if (((x >> i) & 1) != fg) break;
    ++cnt;
  }
  int mod = 1 << 8;
  dp[0][fg][cnt][x % mod] = 1;
  int Lim = K + 40;
  for (int i = 1; i <= K; ++i) {
    int now = i & 1, pre = now ^ 1;
    memset(dp[now], 0, sizeof(dp[now]));
    for (int f = 0; f < 2; ++f) {
      for (int c = 1; c < Lim; ++c) {
        for (int st = 0; st < mod; ++st) {
          int nst = st * 2 % mod;
          int tf = (st >> 7) & 1;
          if (tf == f)
            dp[now][tf][c + 1][nst] += dp[pre][f][c][st] * mul;
          else
            dp[now][tf][1][nst] += dp[pre][f][c][st] * mul;
          nst = st + 1;
          if (nst == mod) {
            if (f == 0)
              dp[now][1][1][0] += dp[pre][f][c][st] * add;
            else
              dp[now][0][c][0] += dp[pre][f][c][st] * add;
          } else
            dp[now][f][c][nst] += dp[pre][f][c][st] * add;
        }
      }
    }
  }
  double ans = 0;
  for (int f = 0; f < 2; ++f)
    for (int c = 1; c < Lim; ++c)
      for (int st = 1; st < mod; ++st) ans += dp[K & 1][f][c][st] * val(st);
  for (int f = 0; f < 2; ++f)
    for (int c = 1; c < Lim; ++c) ans += dp[K & 1][f][c][0] * (8 + (f ? 0 : c));
  printf("%.13f\n", ans);
  return 0;
}
