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
#include <bits/stdc++.h>
using namespace std;
const int ONE = 800005;
const int MOD = 1e9 + 7;
const int all = 255;
int x, n;
double p;
double f[205][260][255][2];
double Ans;
int val, num;
int get() {
  int res;
  char c;
  while ((c = getchar()) < 48 || c > 57)
    ;
  res = c - 48;
  while ((c = getchar()) >= 48 && c <= 57) res = res * 10 + c - 48;
  return res;
}
void Deal_first(int n) {
  int record[250], num = 0, x = n;
  while (x) record[++num] = x & 1, x >>= 1;
  int j = 1, pos = 9, val = record[pos];
  for (pos = 9; pos + j - 1 <= num; j++)
    if (record[pos + j] != val) break;
  f[0][n & all][j][val] = 1;
}
int Get(int x) {
  int res = 0;
  while (x % 2 == 0) res++, x >>= 1;
  return res;
}
int main() {
  x = get(), n = get(), p = (double)get() / 100;
  Deal_first(x);
  for (int i = 0; i < n; i++)
    for (int s = 0; s <= all; s++)
      for (int j = 1; j <= 250; j++)
        for (int k = 0; k <= 1; k++) {
          val = s >> 8 - 1 & 1;
          if (val != k)
            num = 1;
          else
            num = j + 1;
          f[i + 1][s << 1 & all][num][val] += f[i][s][j][k] * p;
          val = s == all ? (k ^ 1) : k;
          if (val != k && k == 0)
            num = 1;
          else
            num = j;
          f[i + 1][s + 1 & all][num][val] += f[i][s][j][k] * (1 - p);
        }
  for (int s = 0; s <= all; s++)
    for (int j = 1; j <= 250; j++)
      for (int k = 0; k <= 1; k++) {
        if (s == 0 && k == 0)
          val = j + 8;
        else if (s == 0 && k == 1)
          val = 8;
        else
          val = Get(s);
        Ans += f[n][s][j][k] * val;
      }
  printf("%.8lf", Ans);
}
