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;
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
long long Pow(long long B, long long P) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) R = (R * B);
    P /= 2;
    B = (B * B);
  }
  return R;
}
long long BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return R;
}
int step;
double p1, p2;
double dp[2][515][235][2];
double rec(int pos, int mask, int cons, int typ) {
  double &ret = dp[pos][mask][cons][typ];
  ret = 0.0;
  int eightBit = 0;
  if (mask & (1 << 8)) eightBit = 1;
  int newCons, newTyp;
  if (eightBit && typ)
    newTyp = typ, newCons = cons + 1;
  else if (eightBit == 0 && typ)
    newTyp = 0, newCons = 1;
  else if (eightBit && typ == 0)
    newTyp = 1, newCons = 1;
  else if (eightBit == 0 && typ == 0)
    newTyp = typ, newCons = cons + 1;
  ret = p1 * dp[1 - pos][(mask << 1) & 511][newCons][newTyp];
  int newMask = mask + 1;
  if (newMask & (1 << 9)) {
    if (typ)
      newTyp = 0, newCons = cons;
    else
      newTyp = 1, newCons = 1;
    ret += p2 * dp[1 - pos][newMask & 511][newCons][newTyp];
  } else
    ret += p2 * dp[1 - pos][newMask][cons][typ];
  return ret;
}
void baseCase(int pos, int mask, int cons, int typ) {
  double &ret = dp[pos][mask][cons][typ];
  for (int i = 0; i <= 8; i++)
    if (mask & (1 << i)) {
      ret = i * 1.0;
      return;
    }
  if (typ == 1)
    ret = 9.0;
  else
    ret = cons * 1.0 + 9.0;
  return;
}
int main() {
  int x, p;
  cin >> x >> step >> p;
  p1 = (p * 1.0) / 100.0;
  p2 = 1.0 - p1;
  for (int mask = 0; mask < 512; mask++)
    for (int cons = 0; cons < 235; cons++)
      for (int typ = 0; typ <= 1; typ++) baseCase(0, mask, cons, typ);
  for (int pos = 1, nowStep = 1; nowStep <= step; nowStep++, pos = 1 - pos) {
    for (int mask = 0; mask < 512; mask++)
      for (int cons = 0; cons < 233; cons++)
        for (int typ = 0; typ <= 1; typ++) rec(pos, mask, cons, typ);
  }
  int mask = x & 511;
  int typ = 0, cons = 1;
  if (x & (1 << 9)) typ = 1;
  for (int i = 10; i <= 30; i++) {
    if ((x & (1 << i)) && typ)
      cons++;
    else if ((x & (1 << i)) == 0 && typ == 0)
      cons++;
    else
      break;
  }
  int pos = 0;
  if (step % 2) pos = 1;
  double ans = dp[pos][mask][cons][typ];
  printf("%.14lf\n", ans);
  return 0;
}
