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 gcd(int a, int b) {
  return (b > a) ? gcd(b, a) : (b == 0) ? a : gcd(b, a % b);
}
int bitcount(int a) { return (a != 0) ? bitcount(a & (a - 1)) + 1 : 0; }
long long bigmod(long long num, long long pow, long long prime) {
  if (pow == 0ll) return 1ll;
  long long ans = bigmod(num, pow / 2ll, prime);
  ans = (ans * ans) % prime;
  if (pow % 2ll) ans = (ans * num) % prime;
  return ans;
}
double dp[210][260][2][260];
bool vis[210][260][2][260];
long long x, k, p, mask, bb, cc;
double solve(long long stp, long long msk, long long bt, long long cnt) {
  if (stp == 0) {
    if (msk == 0)
      return (bt == 1) ? (double)8ll : (double)(8ll + cnt);
    else {
      for (int i = (0); i < (8); ++i)
        if (msk & (1ll << i)) return (double)i;
    }
  }
  if (vis[stp][msk][bt][cnt]) return dp[stp][msk][bt][cnt];
  vis[stp][msk][bt][cnt] = 1;
  dp[stp][msk][bt][cnt] = 0.0;
  long long msk2, bt2, cnt2;
  msk2 = msk * 2;
  if (msk2 >= 256) {
    if (bt == 1) {
      bt2 = 1;
      cnt2 = cnt + 1;
    } else {
      bt2 = 1;
      cnt2 = 1;
    }
    msk2 %= 256;
    dp[stp][msk][bt][cnt] +=
        (((double)(p)*solve(stp - 1, msk2, bt2, cnt2)) / 100.0);
  } else {
    if (bt == 0) {
      bt2 = 0;
      cnt2 = cnt + 1;
    } else {
      bt2 = 0;
      cnt2 = 1;
    }
    msk2 %= 256;
    dp[stp][msk][bt][cnt] +=
        (((double)(p)*solve(stp - 1, msk2, bt2, cnt2)) / 100.0);
  }
  msk2 = msk + 1;
  if (msk2 >= 256) {
    if (bt == 1) {
      bt2 = 0;
      cnt2 = cnt;
    } else {
      bt2 = 1;
      cnt2 = 250;
    }
    msk2 %= 256;
    dp[stp][msk][bt][cnt] +=
        (((double)(100 - p) * solve(stp - 1, msk2, bt2, cnt2)) / 100.0);
  } else {
    msk2 %= 256;
    dp[stp][msk][bt][cnt] +=
        (((double)(100 - p) * solve(stp - 1, msk2, bt, cnt)) / 100.0);
  }
  return dp[stp][msk][bt][cnt];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> x >> k >> p;
  mask = x % 256ll;
  bb = ((x >> 8) & 1ll) ? 1ll : 0ll;
  cc = 0;
  for (int i = (8); i < (33); ++i) {
    if (((x >> i) & 1ll) == bb)
      cc++;
    else
      break;
  }
  double ans = solve(k, mask, bb, cc);
  printf("%0.7lf\n", ans);
  return 0;
}
