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 inf = 2000000000;
static inline int Rint() {
  struct X {
    int dig[256];
    X() {
      for (int i = '0'; i <= '9'; ++i) dig[i] = 1;
      dig['-'] = 1;
    }
  };
  static X fuck;
  int s = 1, v = 0, c;
  for (; !fuck.dig[c = getchar()];)
    ;
  if (c == '-')
    s = 0;
  else if (fuck.dig[c])
    v = c ^ 48;
  for (; fuck.dig[c = getchar()]; v = v * 10 + (c ^ 48))
    ;
  return s ? v : -v;
}
template <typename T>
static inline void cmax(T& a, const T& b) {
  if (b > a) a = b;
}
template <typename T>
static inline void cmin(T& a, const T& b) {
  if (b < a) a = b;
}
double dp[2][256][256];
static inline int get_id(long long curr) {
  if (curr < 256) return 0 << 8 | curr;
  if (curr % 256 == 0) {
    int i = 8;
    while ((curr & (1LL << i)) == 0) ++i;
    return 1 << 8 | i;
  } else {
    int i = 8;
    while ((curr & (1LL << i))) ++i;
    return i << 8 | curr % 256;
  }
}
int main() {
  int x = Rint(), k = Rint(), p = Rint();
  const double p_mul = p * 0.01;
  const double p_add = 1 - p_mul;
  memset(dp, 0, sizeof dp);
  double(*from)[256] = dp[0];
  double(*to)[256] = dp[1];
  {
    int f = get_id(x);
    from[f >> 8][f & 255] = 1.0;
  }
  for (int iter = 1; iter <= k; ++iter) {
    memset(to, 0, sizeof dp[1]);
    for (int i = 0; i < 256; ++i)
      if (from[0][i] > 0) {
        {
          int f = get_id(i * 2);
          to[f >> 8][f & 255] += from[0][i] * p_mul;
        }
        {
          int f = get_id(i + 1);
          to[f >> 8][f & 255] += from[0][i] * p_add;
        }
      }
    for (int i = 8; i <= 200; ++i)
      for (int j = 1; j < 256; ++j)
        if (from[i][j] > 0) {
          if (j + 1 <= 255) {
            to[i][j + 1] += from[i][j] * p_add;
          } else {
            to[1][i] += from[i][j] * p_add;
          }
          if (j >= 128) {
            if (j * 2 % 256 == 0) {
              to[1][8] += from[i][j] * p_mul;
            } else {
              to[i + 1][j * 2 % 256] += from[i][j] * p_mul;
            }
          } else {
            to[8][j * 2 % 256] += from[i][j] * p_mul;
          }
        }
    for (int i = 8; i < 255; ++i)
      if (from[1][i] > 0) {
        to[1][i + 1] += from[1][i] * p_mul;
        to[0][1] += from[1][i] * p_add;
      }
    swap(from, to);
  }
  double ans = 0;
  for (int i = 0; i < 256; ++i)
    if (from[0][i] > 0) {
      int t = i;
      int c = 0;
      while (t % 2 == 0) t /= 2, ++c;
      ans += c * from[0][i];
    }
  for (int i = 8; i <= 200; ++i)
    for (int j = 1; j < 256; ++j)
      if (from[i][j] > 0) {
        int t = j;
        int c = 0;
        while (t % 2 == 0) t /= 2, ++c;
        ans += c * from[i][j];
      }
  for (int i = 8; i <= 255; ++i)
    if (from[1][i] > 0) {
      ans += i * from[1][i];
    }
  printf("%.16f\n", ans);
  return 0;
}