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[400][1000];
double numZero[400][1000];
double slow(int x, int K, double p) {
  if (K == 0) {
    int res = 0;
    while (x % 2 == 0) {
      x /= 2;
      res++;
    }
    return res;
  }
  return p * slow(x * 2, K - 1, p) + (1 - p) * slow(x + 1, K - 1, p);
}
double go(int x, int K, double p) {
  for (int k = 0; k <= K; k++) {
    for (int m = 0; m < (1 << 9); m++) {
      dp[k][m] = 0;
      numZero[k][m] = 0;
    }
  }
  dp[0][x & ((1 << 9) - 1)] = 1;
  int v = x >> 8;
  if (v % 2) v++;
  if (v) {
    while (v && v % 2 == 0) {
      numZero[0][x & ((1 << 9) - 1)]++;
      v /= 2;
    }
  }
  for (int k = 0; k < K; k++) {
    for (int m = 0; m < (1 << 9); m++) {
      double prob = dp[k][m] * p;
      int nm = (m << 1) & ((1 << 9) - 1);
      dp[k + 1][nm] += prob;
      if (bool(m & (1 << 8)) == bool(m & (1 << 7))) {
        numZero[k + 1][nm] += (numZero[k][m] * p) + 1 * prob;
      } else {
        numZero[k + 1][nm] += 1 * prob;
      }
      prob = dp[k][m] * (1 - p);
      nm = (m + 1) & ((1 << 9) - 1);
      dp[k + 1][nm] += prob;
      numZero[k + 1][nm] += numZero[k][m] * (1 - p);
    }
  }
  double res = 0;
  for (int m = 0; m < (1 << 9); m++) {
    if (m == 0) {
      res += numZero[K][0] + 8 * dp[K][m];
    } else {
      int cnt = 0;
      for (int v = m; v % 2 == 0; v /= 2) {
        cnt++;
      }
      res += cnt * dp[K][m];
    }
  }
  return res;
}
int main() {
  int x, K;
  double p;
  cin >> x >> K >> p;
  p /= 100;
  double res = go(x, K, p);
  cout << fixed << setprecision(20);
  cout << res << '\n';
  return 0;
}
