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 f[240][2][201][260];
int k, p;
double tim(int prev, int num, int mask) {
  int i, tmp = 0;
  bool check = false;
  for (i = 0; i < 8; i++) {
    if (((mask >> i) & 1) == 0) {
      if (!check) tmp++;
    } else {
      check = true;
      break;
    }
  }
  if (!check && num == 0) {
    return 1.0 * (tmp + prev);
  } else {
    return 1.0 * tmp;
  }
}
double dp(int prev, int num, int move, int mask) {
  if (move == 0) return tim(prev, num, mask);
  if (f[prev][num][move][mask] != -1) return f[prev][num][move][mask];
  f[prev][num][move][mask] = 0;
  int new_prev, new_mask, new_num;
  new_mask = mask * 2;
  if (new_mask >= (1 << 8)) {
    new_num = 1;
    if (num == 1)
      new_prev = prev + 1;
    else
      new_prev = 1;
  } else {
    new_num = 0;
    if (num == 1)
      new_prev = 1;
    else
      new_prev = prev + 1;
  }
  if (prev == 0) new_prev = 0;
  new_mask = new_mask & ((1 << 8) - 1);
  f[prev][num][move][mask] +=
      p * 0.01 * dp(new_prev, new_num, move - 1, new_mask);
  new_mask = mask + 1;
  if (k - move >= 8 && mask == ((1 << 8) - 1)) {
    if ((new_mask >> 8) & 1) {
      if (num == 0) {
        new_num = 1;
        new_prev = 1;
      }
      if (num == 1) {
        new_num = 0;
        new_prev = prev;
      }
    }
  } else {
    new_num = num;
    new_prev = prev;
  }
  new_mask = new_mask & ((1 << 8) - 1);
  f[prev][num][move][mask] +=
      (100 - p) * 0.01 * dp(new_prev, new_num, move - 1, new_mask);
  return f[prev][num][move][mask];
}
int main() {
  string s;
  int x, t = 0, num = 0, prev = 0, mask = 0, i, j, k1, l;
  for (i = 0; i < 235; i++) {
    for (j = 0; j <= 1; j++) {
      for (k1 = 0; k1 < 201; k1++) {
        for (l = 0; l < 260; l++) f[i][j][k1][l] = -1;
      }
    }
  }
  cin >> x >> k >> p;
  while (x) {
    t++;
    if (t <= 8) {
      s += x % 2 + '0';
    } else {
      if (t == 9) {
        num = x % 2;
        prev++;
      } else {
        if (num != x % 2) break;
        prev++;
      }
    }
    x /= 2;
  }
  reverse(s.begin(), s.end());
  for (i = 0; i < s.length(); i++) mask = mask * 2 + s[i] - '0';
  cout.precision(10);
  cout << fixed;
  cout << dp(prev, num, k, mask);
}