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;
double dp[2][1 << 8][2][444], p;
int x, k;
int main() {
  cin >> x >> k >> p;
  p /= 100;
  int ninth = (x & (1 << 8)) > 0;
  int cnt = 0;
  while (true) {
    cnt++;
    if (ninth != ((x & (1 << (8 + cnt))) > 0)) break;
  }
  for (int a = 0; a < 2; a++)
    for (int b = 0; b < (1 << 8); b++)
      for (int c = 0; c < 1; c++)
        for (int d = 0; d < 444; d++) dp[a][b][c][d] = 0;
  dp[0][x & ((1 << 8) - 1)][ninth][cnt] = 1.;
  for (int step = 1; step <= k; step++) {
    for (int bit = 0; bit < (1 << 8); bit++) {
      for (int last = 0; last < 2; last++) {
        for (int cnt = 0; cnt < 444; cnt++) {
          double& now = dp[(step + 1) % 2][bit][last][cnt];
          int dmask = (bit << 1) & ((1 << 8) - 1);
          int dlast = (bit & (1 << 7)) > 0;
          int dcnt = cnt + 1;
          if (dlast != last) dcnt = 1;
          dp[step % 2][dmask][dlast][dcnt] += now * p;
          int amask = bit + 1;
          if (amask == (1 << 8)) {
            if (last == 1)
              dp[step % 2][0][0][cnt] += now * (1 - p);
            else
              dp[step % 2][0][1][1] += now * (1 - p);
          } else
            dp[step % 2][amask][last][cnt] += now * (1 - p);
          now = 0;
        }
      }
    }
  }
  double ans = 0;
  k %= 2;
  for (int bit = 1; bit < (1 << 8); bit++) {
    for (int last = 0; last < 2; last++) {
      for (int cnt = 0; cnt < 444; cnt++) {
        int s = 0, tmp = bit;
        while (tmp % 2 == 0) {
          s++;
          tmp /= 2;
        }
        ans += dp[k][bit][last][cnt] * s;
      }
    }
  }
  for (int cnt = 0; cnt < 444; cnt++) {
    ans += dp[k][0][0][cnt] * (8 + cnt);
    ans += dp[k][0][1][cnt] * 8;
  }
  cout.precision(16);
  cout << ans;
}