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>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target_tbl( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << '\n';
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().count());
int xx[8] = {1, -1, 0, 0, 1, -1, 1, -1};
int yy[8] = {0, 0, 1, -1, -1, -1, 1, 1};
string dir = "RDLU";
string travel = "ENWS";
const int N = 1e5 + 50, oo = 1e18 + 500;
const int mod = 1e9 + 9;
const int M2 = 1000000093, x2 = 27162;
const int M1 = 1000000087, x1 = 241;
const double eps = 1e-18, PI = 2 * acos(0.0);
int cnt = 0;
vector<vector<int> > g;
vector<int> visit;
uniform_int_distribution<> dis(1, 100);
int run(int x, int k, int p) {
  int a = x;
  for (int step = 1; step <= k; step = step + 1) {
    int rnd = dis(rng);
    if (rnd <= p)
      a = a * 2;
    else
      a = a + 1;
  }
  int s = 0;
  while (!(a & 1)) {
    a >>= 1;
    s = s + 1;
  }
  return s;
}
double dp[201][256][2][250];
signed main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int x, k, p;
  cin >> x >> k >> p;
  int mask = 0;
  for (int j = 0; j < 8; j++) {
    mask += (1 << j) & x;
  }
  bool last = (1 << 8) & x;
  cnt = 0;
  for (int j = 8; j < 30; j++) {
    bool cur = (1 << j) & x;
    if (cur != last) break;
    cnt++;
  }
  dp[0][mask][last][cnt] = 1;
  double prob = (double)p / 100.0;
  int cut = (1 << 8) - 1;
  for (int i = 0; i < k; i++) {
    for (int mask = 0; mask < (1 << 8); mask++) {
      for (int last = 0; last < 2; last++) {
        for (int cnt = 0; cnt < 250; cnt++) {
          int new_mask;
          bool new_last;
          int new_cnt;
          {
            new_mask = mask << 1;
            new_last = new_mask & (1 << 8);
            new_cnt = (last == new_last ? cnt + 1 : 1);
            dp[i + 1][new_mask & cut][new_last][new_cnt] +=
                dp[i][mask][last][cnt] * prob;
          }
          {
            new_mask = mask + 1;
            new_last = (new_mask == (1 << 8) ? !last : last);
            new_cnt = (new_mask == (1 << 8) ? (new_last == 1 ? 1 : cnt) : cnt);
            dp[i + 1][new_mask & cut][new_last][new_cnt] +=
                dp[i][mask][last][cnt] * (1 - prob);
          }
        }
      }
    }
  }
  double ans = 0;
  for (int mask = 0; mask < (1 << 8); mask++) {
    for (int last = 0; last < 2; last++) {
      for (int cnt = 0; cnt < 250; cnt++) {
        if (!mask) {
          if (last) {
            ans += dp[k][mask][last][cnt] * 8;
          } else {
            ans += dp[k][mask][last][cnt] * (8 + cnt);
          }
          continue;
        }
        for (int j = 0; j < 8; j++) {
          if ((1 << j) & mask) {
            ans += dp[k][mask][last][cnt] * j;
            break;
          }
        }
      }
    }
  }
  cout << fixed << setprecision(10) << ans;
}