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;
double p;
const int L = 250;
double f[2][L][256][L];
void initF() {
  {
    int i, j, k, l;
    if (0)
      ;
    else
      for (i = 0; i < 2; i++) {
        if (0)
          ;
        else
          for (j = 0; j < L; j++) {
            if (0)
              ;
            else
              for (k = 0; k < 256; k++) {
                if (0)
                  ;
                else
                  for (l = 0; l < L; l++) {
                    f[i][j][k][l] = -1;
                  }
              }
          }
      }
  }
  {
    int z, o, x, k;
    if (0)
      ;
    else
      for (x = 0; x < 256; x++) {
        int xx = x;
        int s = 0;
        while (xx > 0 && xx % 2 == 0) {
          xx /= 2;
          s++;
        }
        if (0)
          ;
        else
          for (z = 0; z < L; z++) {
            f[0][z][x][0] = x == 0 ? z + 8 : s;
          }
        if (0)
          ;
        else
          for (o = 1; o < L; o++) {
            f[1][o][x][0] = x == 0 ? 8 : s;
          }
      }
  }
}
double getF(int z, int o, int x, int k) {
  if (z >= L || o >= L) {
    return 0;
  };
  x %= 256;
  ("z=%d\to=%d\tx=%d\tk=%d\t", z, o, x, k);
  double &r = f[o > 0][z > 0 ? z : o][x][k];
  if (r == -1) {
    r = 0;
    if (x < 128) {
      ("A");
      r += p * getF(z + 1, 0, x * 2, k - 1);
    } else {
      ("B");
      r += p * getF(0, o + 1, x * 2, k - 1);
    }
    if (x == 255) {
      ("C");
      r += (1 - p) * getF(o, 0, x + 1, k - 1);
    } else {
      ("D");
      r += (1 - p) * getF(z, o, x + 1, k - 1);
    }
  } else {
    ("Calculated");
  }
  ("%f", r);
  return r;
}
int main() {
  ios::sync_with_stdio(false);
  initF();
  int x, k;
  cin >> x >> k >> p;
  p /= 100;
  int z = 0, o = 0;
  int xx = x / 256;
  if (xx % 2) {
    while (xx % 2 == 1) {
      xx /= 2;
      o++;
    }
  } else {
    while (xx > 0 && xx % 2 == 0) {
      xx /= 2;
      z++;
    }
  }
  double ans;
  int i;
  if (0)
    ;
  else
    for (i = 0; i < k; i++) {
      int j1, j2, j3;
      if (0)
        ;
      else
        for (j1 = 0; j1 < 1; j1++) {
          if (0)
            ;
          else
            for (j2 = 0; j2 < L; j2++) {
              if (0)
                ;
              else
                for (j3 = 0; j3 < 255; j3++) {
                  getF(j1, j2, j3, i);
                }
            }
        }
    }
  ans = getF(z, o, x, k);
  printf("%.15f\n", ans);
  return 0;
}