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;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i) {
    if (i != v.begin()) os << ", ";
    os << *i;
  }
  os << "]";
  return os;
}
const int MOD_ZEROS = 8;
const int MOD = 1 << MOD_ZEROS;
struct Number {
  int zeros, ones, suffix;
  explicit Number(int x) {
    assert(x > 0);
    suffix = x % MOD;
    int t = x / MOD;
    ones = 0;
    while (t % 2 == 1) {
      ++ones;
      t /= 2;
    }
    zeros = 0;
    while (x % 2 == 0) {
      ++zeros;
      x /= 2;
    }
  }
  Number(int _zeros, int _ones, int _suffix)
      : zeros(_zeros), ones(_ones), suffix(_suffix) {}
  Number multiplyByTwo() const;
  Number addOne() const;
};
bool operator<(const Number& a, const Number& b) {
  if (a.zeros != b.zeros) return a.zeros < b.zeros;
  if (a.ones != b.ones) return a.ones < b.ones;
  return a.suffix < b.suffix;
}
ostream& operator<<(ostream& os, const Number& a) {
  os << "(" << a.zeros << ", " << a.ones << ", " << a.suffix << ")";
  return os;
}
Number Number::multiplyByTwo() const {
  return Number(zeros + 1, (suffix * 2 >= MOD) ? ones + 1 : 0,
                suffix * 2 % MOD);
}
Number Number::addOne() const {
  if (suffix + 1 == MOD) {
    return Number(MOD_ZEROS + ones, 0, 0);
  } else {
    int x = suffix + 1, z = 0;
    while (x % 2 == 0) {
      ++z;
      x /= 2;
    }
    return Number(z, ones, suffix + 1);
  }
}
int main() {
  int x, k, pp;
  scanf("%d%d%d", &x, &k, &pp);
  double p = pp / 100.0;
  double q = 1.0 - p;
  map<Number, double> D;
  D[Number(x)] = 1.0;
  for (int i = 0; i < (int)(k); ++i) {
    map<Number, double> T;
    for (__typeof((D).begin()) j = (D).begin(); j != (D).end(); ++j) {
      T[j->first.multiplyByTwo()] += j->second * p;
      T[j->first.addOne()] += j->second * q;
    }
    D.swap(T);
  }
  double res = 0.0;
  for (__typeof((D).begin()) j = (D).begin(); j != (D).end(); ++j) {
    res += j->first.zeros * j->second;
  }
  printf("%.9lf\n", res);
}