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 const N = 250;
int const M = (1 << 8) - 1;
double f[N][N][2][M + 1];
void get_state(int x, int &nth, int &cnt, int &mask) {
  mask = x & M;
  nth = x >> 8 & 1;
  cnt = 0;
  for (int i = 8; (x >> i & 1) == nth && i < 32; ++cnt, ++i)
    ;
}
void get_state(int j, int b, int m, int &nth, int &cnt, int &mask) {
  mask = m & M;
  if (m <= M) {
    nth = b, cnt = j;
    return;
  }
  nth = m >> 8 & 1;
  if (nth == b)
    cnt = j + 1;
  else
    cnt = 1;
}
int main() {
  int x, k, pp;
  int nth, cnt, mask;
  scanf("%d%d%d", &x, &k, &pp);
  double p = pp / 100.0, q = 1 - p;
  get_state(x, nth, cnt, mask);
  f[0][cnt][nth][mask] = 1;
  for (int i = 0; i < k; ++i)
    for (int j = 0; j < N; ++j)
      for (int b = 0; b < 2; ++b)
        for (int m = 0; m <= M; ++m) {
          double c = f[i][j][b][m];
          int b7 = m >> 7 & 1;
          if (b7 == b)
            cnt = j + 1, nth = b;
          else
            cnt = 1, nth = b7;
          f[i + 1][cnt][nth][(2 * m) & M] += p * c;
          if (m + 1 > M) {
            if (b == 0)
              nth = 1, cnt = 1;
            else
              nth = 0, cnt = j;
          } else {
            nth = b, cnt = j;
          }
          f[i + 1][cnt][nth][(m + 1) & M] += q * c;
        }
  double e = 0;
  for (int i = 0; i < N; ++i)
    for (int b = 0; b < 2; ++b)
      for (int m = 0; m <= M; ++m) {
        int len = 0;
        if (m == 0)
          len = 8 + (b ? 0 : i);
        else
          len = __builtin_ctz(m);
        e += len * f[k][i][b][m];
      }
  printf("%.20lf\n", e);
  return 0;
}