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;
double dp[210][260][2][260];
int func(int x) {
  int s = 0;
  while (x % 2 == 0) {
    ++s;
    x >>= 1;
  }
  return s;
}
int main() {
  double ans;
  int x, k, p;
  cin >> x >> k >> p;
  double two = 1.0 * p / 100;
  int s = x & 255;
  int o, num = 0;
  x >>= 8;
  o = x & 1;
  if (o) {
    while (x & 1) {
      ++num;
      x >>= 1;
    }
  } else {
    if (!x)
      num = 1;
    else {
      while (!(x & 1)) {
        ++num;
        x >>= 1;
      }
    }
  }
  dp[0][s][o][num] = 1;
  for (int i = 1; i <= k; ++i) {
    for (int j = 0; j <= 255; ++j) {
      for (int o = 0; o <= 1; ++o) {
        for (int num = 1; num <= 255; ++num) {
          int state = j + 1;
          int no = o, cnt = num;
          if (state > 255) {
            state = 0;
            if (o)
              no = 0, cnt = num;
            else
              no = 1, cnt = 1;
          }
          dp[i][state][no][cnt] += dp[i - 1][j][o][num] * (1 - two);
          state = j << 1;
          cnt = num;
          no = state >> 8;
          if (no == o)
            cnt++;
          else
            cnt = 1;
          state &= 255;
          dp[i][state][no][cnt] += dp[i - 1][j][o][num] * two;
        }
      }
    }
  }
  ans = 0;
  for (int i = 1; i <= 255; ++i) {
    ans += dp[k][0][0][i] * (i + 8);
    ans += dp[k][0][1][i] * 8;
  }
  for (int j = 1; j <= 255; ++j)
    for (int o = 0; o <= 1; ++o)
      for (int num = 1; num <= 255; ++num) ans += dp[k][j][o][num] * func(j);
  printf("%.7lf\n", ans);
}
