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;
pair<int, int> incrementa(pair<int, int> e) {
  if (e.first == 0) {
    e.second++;
    if (e.second == (1 << 8)) {
      e.first = 1;
      e.second = 0;
    }
  } else if (e.first >= 0) {
    e.second++;
    if (e.second == (1 << 8)) {
      e.first = -e.first - 8;
      e.second = 0;
    }
  } else {
    e.second = 1;
    e.first = 0;
  }
  return e;
}
pair<int, int> dobla(pair<int, int> e) {
  if (e.first == 0) {
    e.second *= 2;
    if (e.second >= (1 << 8)) {
      e.second -= (1 << 8);
      e.first = 1;
    }
  } else if (e.first > 0) {
    if (e.second == 0) {
      e.first = -9;
    } else if (e.second & (1 << 7)) {
      e.second -= (1 << 7);
      e.second *= 2;
      e.first++;
    } else {
      e.first = 0;
      e.second *= 2;
    }
  } else {
    e.first--;
  }
  return e;
}
void escribe(pair<int, int> e) {
  cout << "(" << e.first << " " << e.second << ")" << endl;
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(10);
  int x, k, p;
  cin >> x >> k >> p;
  pair<int, int> e;
  if (x & ((1 << 9) - 1)) {
    e = pair<int, int>(0, x & ((1 << 8) - 1));
    x >>= 8;
    while (x & 1) {
      x >>= 1;
      e.first++;
    }
  } else {
    e = pair<int, int>(-__builtin_ctz(x), 0);
  }
  map<pair<int, int>, double> m;
  m[e] = 1;
  for (int i = 0; i < k; i++) {
    map<pair<int, int>, double> nextm;
    for (map<pair<int, int>, double>::iterator it = m.begin(); it != m.end();
         it++) {
      nextm[dobla(it->first)] += it->second * double(p) / 100.0;
      nextm[incrementa(it->first)] += it->second * double(100 - p) / 100.0;
    }
    m = nextm;
  }
  double ex = 0;
  for (map<pair<int, int>, double>::iterator it = m.begin(); it != m.end();
       it++) {
    pair<int, int> p = it->first;
    int c = 0;
    if (p.first == 0)
      c = __builtin_ctz(p.second);
    else if (p.first > 0) {
      if (p.second == 0)
        c = 8;
      else
        c = __builtin_ctz(p.second);
    } else
      c = -p.first;
    ex += it->second * c;
  }
  cout << ex << endl;
}