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;
const int INF = 1 << 29;
const double EPS = 1e-8;
const double PI = acos(-1);
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
ostream &operator<<(ostream &o, const vector<T> &t) {
  o << '[';
  for (__typeof((t).begin()) i = (t).begin(); i != (t).end(); ++i) {
    if (i != t.begin()) o << ',';
    o << *i;
  }
  return o << ']';
}
template <class S, class T>
ostream &operator<<(ostream &o, const pair<S, T> &t) {
  return o << '(' << t.first << ',' << t.second << ')';
}
template <int N, class Tp>
void out(ostream &, const Tp &) {}
template <int N, class Tp, class, class... Ts>
void out(ostream &o, const Tp &t) {
  if (N) o << ',';
  o << get<N>(t);
  out<N + 1, Tp, Ts...>(o, t);
}
template <class... Ts>
ostream &operator<<(ostream &o, const tuple<Ts...> &t) {
  o << '(';
  out<0, tuple<Ts...>, Ts...>(o, t);
  return o << ')';
}
template <class T>
void output(T *a, int n) {
  for (int i = 0; i < (int)(n); ++i) {
    if (i) cout << ',';
    cout << a[i];
  }
  cout << endl;
}
template <class T>
void output(T *a, int n, int m) {
  for (int i = 0; i < (int)(n); ++i) output(a[i], m);
}
template <class T>
void output(T t) {
  if (t < 0) t = -t, putchar('-');
  static int c[20];
  int k = 0;
  while (t) c[k++] = t % 10, t /= 10;
  if (!k) c[k++] = 0;
  while (k) putchar(c[--k] ^ 48);
}
template <class S, class... T>
void output(S a, T... t) {
  output(a);
  putchar(' ');
  output(t...);
}
template <class T>
bool input(T &t) {
  t = 0;
  int n = 0, c;
  while (~(c = getchar()) && !isdigit(c) && c != '-')
    ;
  if (!~c) return 0;
  if (c == '-')
    n = 1;
  else
    t = c ^ 48;
  while (isdigit(c = getchar())) t = 10 * t + c - '0';
  t = n ? -t : t;
  return 1;
}
template <class S, class... T>
bool input(S &a, T &...t) {
  input(a);
  return input(t...);
}
double dp[2][1 << 8][2][250];
int pt[250];
int main() {
  pt[0] = 1;
  for (int i = 0; i < (int)(240); ++i) pt[i + 1] = min(202, pt[i] * 2);
  int x, n, P;
  while (input(x, n, P)) {
    double p = 0.01 * P;
    memset(dp, 0, sizeof(dp));
    int cnt = 0;
    if (x >> 8) {
      for (int i = 8;; ++i) {
        if ((x >> i & 1) ^ (x >> 8 & 1)) break;
        cnt++;
      }
    }
    dp[0][x & ((1 << 8) - 1)][x >> 8 & 1][cnt] = 1;
    for (int i = 0; i < (int)(n); ++i) {
      int cur = i & 1;
      int nxt = i + 1 & 1;
      for (int S = 0; S < (int)(1 << 8); ++S)
        for (int j = 0; j < (int)(2); ++j)
          for (int k = 0; k < (int)(250); ++k) dp[nxt][S][j][k] = 0;
      for (int S = 0; S < (int)(1 << 8); ++S)
        for (int j = 0; j < (int)(2); ++j)
          for (int k = 0; k < (int)(249); ++k) {
            dp[nxt][(S << 1) & ((1 << 8) - 1)][S >> 7][(S >> 7) ^ j ? 1
                                                       : k          ? k + 1
                                                                    : 0] +=
                dp[cur][S][j][k] * p;
            int nj = (((S + 1) >> 8) + j) & 1;
            int nk = (nj == j ? k : j ? k : 1);
            dp[nxt][(S + 1) & ((1 << 8) - 1)][nj][nk] +=
                dp[cur][S][j][k] * (1 - p);
          }
    }
    double ans = 0;
    for (int j = 0; j < (int)(2); ++j) {
      for (int S = 0; S < (int)(1 << 8); ++S) {
        for (int k = 0; k < (int)(250); ++k) {
          double q = dp[n & 1][S][j][k];
          if (S) {
            ans += q * __builtin_ctz(S);
          } else {
            if (j) {
              ans += q * 8;
            } else {
              if (k) ans += q * (8 + k);
            }
          }
        }
      }
    }
    printf("%.10f\n", ans);
  }
}