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 x, k, p;
double mem[205][1 << 8][2][230];
char vis[205][1 << 8][2][230];
double dp(int i, int x, int f, int j) {
  if (i == k) {
    if (x)
      for (int l = 0; l < int(8); l++)
        if (x & (1 << l)) return l;
    if (f) return 8;
    return 8 + j;
  }
  double &res = mem[i][x][f][j];
  if (vis[i][x][f][j]) return res;
  vis[i][x][f][j] = 1;
  if (x + 1 == (1 << 8)) {
    if (f)
      res += (1 - p / double(100)) * dp(i + 1, 0, 0, j);
    else
      res += (1 - p / double(100)) * dp(i + 1, 0, 1, 1);
  } else {
    res += (1 - p / double(100)) * dp(i + 1, x + 1, f, j);
  }
  if (x & (1 << 7)) {
    if (f)
      res += p / double(100) * dp(i + 1, (x << 1) & ((1 << 8) - 1), 1, j + 1);
    else
      res += p / double(100) * dp(i + 1, (x << 1) & ((1 << 8) - 1), 1, 1);
  } else {
    if (f)
      res += p / double(100) * dp(i + 1, x << 1, 0, 1);
    else
      res += p / double(100) * dp(i + 1, x << 1, 0, j + 1);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(10);
  cin >> x >> k >> p;
  int suf = 0;
  for (int i = 8; bool(x & (1 << i)) == bool(x & (1 << 8)) && i < 30;
       i++, suf++)
    ;
  cout << dp(0, x & ((1 << 8) - 1), (x >> 8) & 1, suf) << '\n';
  return 0;
}