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;
template <typename T>
T in() {
  char ch;
  T n = 0;
  bool ng = false;
  while (1) {
    ch = getchar();
    if (ch == '-') {
      ng = true;
      ch = getchar();
      break;
    }
    if (ch >= '0' && ch <= '9') break;
  }
  while (1) {
    n = n * 10 + (ch - '0');
    ch = getchar();
    if (ch < '0' || ch > '9') break;
  }
  return (ng ? -n : n);
}
template <typename T>
inline T POW(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * POW(B, P - 1);
  else
    return (POW(B, P / 2) * POW(B, P / 2));
}
template <typename T>
inline T Gcd(T a, T b) {
  if (a < 0) return Gcd(-a, b);
  if (b < 0) return Gcd(a, -b);
  return (b == 0) ? a : Gcd(b, a % b);
}
template <typename T>
inline T Lcm(T a, T b) {
  if (a < 0) return Lcm(-a, b);
  if (b < 0) return Lcm(a, -b);
  return a * (b / Gcd(a, b));
}
long long Bigmod(long long base, long long power, long long MOD) {
  long long ret = 1;
  while (power) {
    if (power & 1) ret = (ret * base) % MOD;
    base = (base * base) % MOD;
    power >>= 1;
  }
  return ret;
}
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
long long ModInverse(long long number, long long MOD) {
  return Bigmod(number, MOD - 2, MOD);
}
bool isConst(char ch) {
  if (isalpha(ch) && !isVowel(ch)) return true;
  return false;
}
int toInt(string s) {
  int sm;
  stringstream second(s);
  second >> sm;
  return sm;
}
double p, q, dp[202][257][257][2];
bool vis[202][257][257][2];
double Solve(int pos, int mask, int cnt, int f) {
  if (!pos) {
    if (mask == 0) {
      double x = (8.0 + ((f == 0) ? cnt : 0));
      return x;
    } else {
      int tot = 0;
      while (mask && mask % 2 == 0) {
        tot++;
        mask /= 2;
      }
      return (tot * 1.0);
    }
  }
  double &res = dp[pos][mask][cnt][f];
  if (vis[pos][mask][cnt][f]) return res;
  vis[pos][mask][cnt][f] = true;
  res = 0.0;
  int mk = mask * 2;
  if (mk >= 256) {
    int ncnt = 1;
    if (f == 1) ncnt = cnt + 1;
    res += p * Solve(pos - 1, mk % 256, ncnt, 1);
  } else {
    int ncnt = 1;
    if (f == 0) ncnt = cnt + 1;
    res += p * Solve(pos - 1, mk % 256, ncnt, 0);
  }
  mk = mask + 1;
  if (mk >= 256) {
    int ncnt = 0, nbit = 0;
    if (f == 1) {
      nbit = 0;
      ncnt = cnt;
    } else {
      nbit = 1;
      ncnt = 1;
    }
    res += q * Solve(pos - 1, mk % 256, ncnt, nbit);
  } else {
    res += q * Solve(pos - 1, mk, cnt, f);
  }
  return res;
}
int main() {
  int x, k, pp;
  x = in<int>(), k = in<int>(), pp = in<int>();
  p = (pp * 1.0) / (100.0), q = (1.0 - p);
  int msk = x % 256;
  int bit = ((x >> 8) & 1) ? 1 : 0;
  int cnt = 0;
  for (int i = 8; i <= 30; i++) {
    int bt = (x & (1 << i));
    if (bt >= 1) bt = 1;
    if ((1 << i) <= x && bt == bit)
      cnt++;
    else
      break;
  }
  double ans = Solve(k, msk, cnt, bit);
  printf("%.10lf\n", ans);
  return 0;
}