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;
int x, steps, p, belong[305], g[305][2][233];
int s[1000050], m[1000050], l[1000050], c[1000050];
bool visited[205][256][2][233];
double add, mul, f[205][256][2][233];
int Rand() { return (rand() << 15) | rand(); }
void Solve(int step, int mask, int last, int cnt) {
  int newmask, newlast, newcnt, low, high, lm, hm;
  low = high = 0;
  s[0] = step;
  m[0] = mask;
  l[0] = last;
  c[0] = cnt;
  visited[step][mask][last][cnt] = true;
  f[step][mask][last][cnt] = 1;
  while (low <= high) {
    lm = low % 1000000;
    step = s[lm];
    mask = m[lm];
    last = l[lm];
    cnt = c[lm];
    if (step == steps) {
      low++;
      continue;
    }
    newmask = (mask << 1) & 255;
    newlast = (mask >> 7) & 1;
    if (cnt == 232) {
      if (newlast != last) {
        newcnt = 0;
      } else {
        newcnt = 232;
      }
    } else {
      if (newlast != last) {
        newcnt = 0;
      } else {
        newcnt = cnt + 1;
      }
    }
    f[step + 1][newmask][newlast][newcnt] += f[step][mask][last][cnt] * mul;
    if (!visited[step + 1][newmask][newlast][newcnt]) {
      visited[step + 1][newmask][newlast][newcnt] = true;
      high++;
      hm = high % 1000000;
      s[hm] = step + 1;
      m[hm] = newmask;
      l[hm] = newlast;
      c[hm] = newcnt;
    }
    if (mask == 255) {
      newmask = 0;
      if (last == 0) {
        newlast = 1;
        newcnt = 0;
      } else {
        newlast = 0;
        newcnt = cnt;
      }
    } else {
      newmask = mask + 1;
      newlast = last;
      newcnt = cnt;
    }
    f[step + 1][newmask][newlast][newcnt] += f[step][mask][last][cnt] * add;
    if (!visited[step + 1][newmask][newlast][newcnt]) {
      visited[step + 1][newmask][newlast][newcnt] = true;
      high++;
      hm = high % 1000000;
      s[hm] = step + 1;
      m[hm] = newmask;
      l[hm] = newlast;
      c[hm] = newcnt;
    }
    low++;
  }
  return;
}
int main() {
  int i, j, k, mask, last, cnt;
  double answer;
  srand((unsigned)time(0));
  scanf("%d%d%d", &x, &steps, &p);
  mul = p / 100.0;
  add = 1.0 - mul;
  for (i = 0; i < 8; i++) {
    belong[1 << i] = i;
  }
  for (i = 0; i < 1 << 8; i++) {
    for (j = 0; j <= 1; j++) {
      for (k = 0; k < 233; k++) {
        if (i == 0) {
          if (j == 0) {
            g[i][j][k] = 9 + k;
          } else {
            g[i][j][k] = 8;
          }
        } else {
          g[i][j][k] = belong[i & -i];
        }
      }
    }
  }
  mask = x & 255;
  last = (x >> 8) & 1;
  cnt = 0;
  for (i = 9; (1 << i) <= x; i++)
    if (((x >> i) & 1) == last) {
      cnt++;
    } else {
      break;
    }
  if (x < 256) {
    cnt = 232;
  }
  Solve(0, mask, last, cnt);
  answer = 0;
  for (i = 0; i < 1 << 8; i++) {
    for (j = 0; j <= 1; j++) {
      for (k = 0; k < 233; k++) {
        answer += f[steps][i][j][k] * g[i][j][k];
      }
    }
  }
  printf("%.10lf\n", answer);
  return 0;
}
