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 getint() {
  unsigned int c;
  int x = 0;
  while (((c = getchar()) - '0') >= 10) {
    if (c == '-') return -getint();
    if (!~c) exit(0);
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while (((c = getchar()) - '0') < 10);
  return x;
}
int getstr(char *s) {
  int c, n = 0;
  while ((c = getchar()) <= ' ') {
    if (!~c) exit(0);
  }
  do {
    s[n++] = c;
  } while ((c = getchar()) > ' ');
  s[n] = 0;
  return n;
}
template <class T>
inline bool chmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
int count_last_zero(int x) {
  if (x == 0) return 8;
  int d = 0;
  while ((x & 1) == 0) x >>= 1, d++;
  return d;
}
int x, k, p;
const int mask8 = (1 << 8) - 1;
double prob, cprob;
int newUpc, newUp, newLast;
void add1(int upC, int up, int last) {
  newLast = 1 + last & mask8;
  if (newLast == 0) {
    if (up == 0) {
      newUp = 1, newUpc = 1;
    } else {
      newUp = 0, newUpc = upC;
    }
  } else {
    newUp = up, newUpc = upC;
  }
}
void mul2(int upC, int up, int last) {
  last = last * 2;
  newLast = last & mask8;
  if ((last >> 8) == up) {
    newUp = up, newUpc = upC + 1;
  } else {
    newUp = 1 - up, newUpc = 1;
  }
}
double cache[201][244][2][1 << 8];
double solve(int rest, int upC, int up, int last) {
  double &res = cache[rest][upC][up][last];
  if (res > -0.5) return res;
  if (rest == 0) {
    int d = count_last_zero(last);
    if (d == 8) {
      if (up == 0) {
        d += upC;
      }
    }
    return res = d;
  }
  res = 0;
  add1(upC, up, last);
  res += cprob * solve(rest - 1, newUpc, newUp, newLast);
  mul2(upC, up, last);
  res += prob * solve(rest - 1, newUpc, newUp, newLast);
  return res;
}
int main() {
  int i, j, tcc, tc = 1 << 28;
  for (tcc = 0; tcc < tc; tcc++) {
    x = getint(), k = getint(), p = getint();
    for (i = 0; i < 201; i++)
      for (j = 0; j < 244; j++)
        for (int h = 0; h < 1 << 8; h++) {
          cache[i][j][0][h] = cache[i][j][1][h] = -1;
        }
    prob = p / 100.0;
    cprob = (100 - p) / 100.;
    int last = x & mask8;
    x >>= 8;
    int up = x & 1, upC = 0;
    if (x) {
      while (up == (x & 1)) upC++, x >>= 1;
    }
    printf("%.10f\n", solve(k, upC, up, last));
  }
  return 0;
}