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;
int x, k, p;
string toBinary(int v) {
  vector<char> s;
  while (v) {
    if (v % 2 == 1)
      s.push_back('1');
    else
      s.push_back('0');
    v /= 2;
  }
  string ret;
  for (int i = 0; i < s.size(); i++) ret += s[i];
  return ret;
}
struct value {
  int type;
  int num;
  int r;
  void plusOne() {
    int v = (r == 255);
    r = (r + 1) % 256;
    if (type == 0) {
      if (v == 1) {
        type = 1;
      }
    } else {
      if (v == 1) {
        if (num == 1) {
          type = 0;
          num = 2;
        } else {
          type = 0;
          num = 1;
        }
      }
    }
  }
  void mul2() {
    int v = (r & 128) > 0;
    r = (r * 2) % 256;
    if (type == 0) {
      if (v == 1)
        num++;
      else {
        num = 1;
        type = 1;
      }
    } else {
      if (v == 0)
        num++;
      else {
        num = 1;
        type = 0;
      }
    }
  }
  int getAns() {
    int ret = 0;
    for (int i = 0; i < 8; i++)
      if ((r & (1 << i)) == 0)
        ret++;
      else
        return ret;
    if (type == 0) return ret;
    return num + ret;
  }
};
float mem[2][256][256][256];
bool done[2][256][256][256];
float f(value v, int remain) {
  if (remain == 0) return v.getAns();
  if (done[v.type][v.num][v.r][remain]) return mem[v.type][v.num][v.r][remain];
  float ret = 0;
  value v1 = v;
  value v2 = v;
  v1.mul2();
  v2.plusOne();
  ret += 0.01 * p * f(v1, remain - 1);
  ret += (1 - 0.01 * p) * f(v2, remain - 1);
  done[v.type][v.num][v.r][remain] = true;
  mem[v.type][v.num][v.r][remain] = ret;
  return ret;
}
value getVal(int v) {
  value ret;
  ret.r = v % 256;
  string s = toBinary(v);
  if (s.length() <= 8) {
    ret.type = 1;
    ret.num = 2;
  } else {
    s += "0";
    int have0 = false, have1 = false;
    ret.num = 0;
    for (int i = 8; i < s.length(); i++) {
      if (s[i] == '0') have0 = true;
      if (s[i] == '1') have1 = true;
      if (have0 && have1) {
        if (s[i] == '0')
          ret.type = 0;
        else
          ret.type = 1;
        return ret;
      }
      ret.num++;
    }
  }
  return ret;
}
int MAIN() {
  cin >> x >> k >> p;
  memset(done, false, sizeof(done));
  cout << f(getVal(x), k) << endl;
  return 0;
}
int main() {
  ios ::sync_with_stdio(false);
  cout << fixed << setprecision(16);
  return MAIN();
}