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;
double dp[2][1 << 9][240][2];
int first, k, p;
double pro;
inline double solve() {
  memset(dp, 0, sizeof(dp));
  int v = (first >> 9);
  if (!v) {
    dp[0][first][0][0] = 1.;
  } else if (v % 2 == 0) {
    int add = 0;
    while (v % 2 == 0) {
      v /= 2;
      ++add;
    }
    dp[0][first % (1 << 9)][add][0] = 1.;
  } else {
    ++v;
    int add = 0;
    while (v % 2 == 0) {
      v /= 2;
      ++add;
    }
    dp[0][first % (1 << 9)][add][1] = 1.;
  }
  int cur = 0, nxt = 1;
  for (int step = 0; step < k; ++step) {
    for (int j = 0; j < (1 << 9); ++j)
      for (int l = 0; l < 240; ++l) dp[nxt][j][l][0] = dp[nxt][j][l][1] = 0;
    for (int mask = 0; mask < (1 << 9); ++mask) {
      int shift = (mask % (1 << 8)) * 2;
      for (int add = 0; add < 239; ++add) {
        double val;
        val = dp[cur][mask][add][0];
        if (val > 1e-15) {
          if ((mask >> 8) == 1) {
            dp[nxt][shift][1][1] += val * pro;
          } else {
            dp[nxt][shift][add + 1][0] += val * pro;
          }
          if (mask == (1 << 9) - 1) {
            dp[nxt][0][add][1] += val * (1 - pro);
          } else {
            dp[nxt][mask + 1][add][0] += val * (1 - pro);
          }
        }
        val = dp[cur][mask][add][1];
        if (val > 1e-15) {
          if ((mask >> 8) == 1) {
            dp[nxt][shift][add + 1][1] += val * pro;
          } else {
            dp[nxt][shift][1][0] += val * pro;
          }
          if (mask == (1 << 9) - 1) {
            dp[nxt][0][add][0] += val * (1 - pro);
          } else {
            dp[nxt][mask + 1][add][1] += val * (1 - pro);
          }
        }
      }
    }
    swap(cur, nxt);
  }
  double ans = 0;
  for (int mask = 0; mask < (1 << 9); ++mask) {
    int down = 0;
    if (mask) {
      int first = mask;
      while (first % 2 == 0) {
        first /= 2;
        ++down;
      }
    }
    for (int add = 0; add < 240; ++add) {
      if (!mask) {
        ans += (9 + add) * dp[cur][mask][add][0];
        ans += 9 * dp[cur][mask][add][1];
      } else {
        ans += down * dp[cur][mask][add][0];
        ans += down * dp[cur][mask][add][1];
      }
    }
  }
  return ans;
}
inline double naive() {
  double ans = 0;
  for (int mask = 0; mask < (1 << k); ++mask) {
    double pr = 1.;
    int val = first;
    for (int i = 0; i < k; ++i) {
      if (mask & (1 << i)) {
        ++val;
        pr *= (1 - pro);
      } else {
        val *= 2;
        pr *= pro;
      }
    }
    int down = 0;
    while (val % 2 == 0) {
      val /= 2;
      ++down;
    }
    ans += down * pr;
  }
  return ans;
}
int main() {
  cin >> first >> k >> p;
  pro = p / 100.;
  printf("%0.9lf\n", solve());
}