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[205][256][2][230];
int main() {
  int x, K, p;
  scanf("%d%d%d", &x, &K, &p);
  double p1 = p / 100.0;
  double p2 = 1.0 - p1;
  int bi = 0;
  int cnt = 0;
  if ((1 << 8) <= x && ((1 << 8) & x) > 0) bi = 1;
  if ((1 << 9) <= x) {
    for (int i = 9;; i++) {
      if ((1 << i) > x) break;
      if (((1 << i) & x) > 0 && bi == 1)
        cnt++;
      else if (((1 << i) & x) == 0 && bi == 0)
        cnt++;
      else
        break;
    }
  }
  dp[K][x % 256][bi][cnt] = 1.0;
  for (int i = K; i >= 1; i--)
    for (int j = 0; j < 256; j++)
      for (int f = 0; f < 2; f++)
        for (int k = 0; k < 228; k++) {
          if (dp[i][j][f][k] == 0) continue;
          int mask = j + 1;
          int ok = 0;
          if (mask > 255) {
            mask -= 256;
            ok = 1;
          }
          if (f == 0) {
            if (ok == 0)
              dp[i - 1][mask][0][k] =
                  dp[i - 1][mask][0][k] + dp[i][j][f][k] * p2;
            else {
              if (k != 0)
                dp[i - 1][mask][1][0] =
                    dp[i - 1][mask][1][0] + dp[i][j][f][k] * p2;
              else
                dp[i - 1][mask][1][1] =
                    dp[i - 1][mask][1][1] + dp[i][j][f][k] * p2;
            }
            if (((1 << 7) & j) > 0)
              ok = 1;
            else
              ok = 0;
            if (ok == 1)
              dp[i - 1][(j - (1 << 7)) << 1][1][0] =
                  dp[i - 1][(j - (1 << 7)) << 1][1][0] + dp[i][j][f][k] * p1;
            else
              dp[i - 1][j << 1][0][k + 1] =
                  dp[i - 1][j << 1][0][k + 1] + dp[i][j][f][k] * p1;
          } else {
            if (ok == 0)
              dp[i - 1][mask][1][k] =
                  dp[i - 1][mask][1][k] + dp[i][j][f][k] * p2;
            else
              dp[i - 1][mask][0][k] =
                  dp[i - 1][mask][0][k] + dp[i][j][f][k] * p2;
            if (((1 << 7) & j) > 0)
              ok = 1;
            else
              ok = 0;
            if (ok == 1)
              dp[i - 1][(j - (1 << 7)) << 1][1][k + 1] =
                  dp[i - 1][(j - (1 << 7)) << 1][1][k + 1] +
                  dp[i][j][f][k] * p1;
            else
              dp[i - 1][j << 1][0][0] =
                  dp[i - 1][j << 1][0][0] + dp[i][j][f][k] * p1;
          }
        }
  double s = 0;
  for (int j = 0; j < 256; j++)
    for (int f = 0; f < 2; f++)
      for (int k = 0; k < 228; k++) {
        if (dp[0][j][f][k] == 0) continue;
        int i = 0;
        for (; i < 8; i++) {
          if (((1 << i) & j) > 0) break;
        }
        if (i < 8 || f == 1) {
          s = s + (double)i * dp[0][j][f][k];
          continue;
        }
        s = s + (double)(i + 1 + k) * dp[0][j][f][k];
      }
  printf("%.13lf\n", s);
  return 0;
}
