#include <bits/stdc++.h>
using namespace std;
double f[240][2][201][260];
int k, p;
double tim(int prev, int num, int mask) {
  int i, tmp = 0;
  bool check = false;
  for (i = 0; i < 8; i++) {
    if (((mask >> i) & 1) == 0) {
      if (!check) tmp++;
    } else {
      check = true;
      break;
    }
  }
  if (!check && num == 0) {
    return 1.0 * (tmp + prev);
  } else {
    return 1.0 * tmp;
  }
}
double dp(int prev, int num, int move, int mask) {
  if (move == 0) return tim(prev, num, mask);
  if (f[prev][num][move][mask] != -1) return f[prev][num][move][mask];
  f[prev][num][move][mask] = 0;
  int new_prev, new_mask, new_num;
  new_mask = mask * 2;
  if (new_mask >= (1 << 8)) {
    new_num = 1;
    if (num == 1)
      new_prev = prev + 1;
    else
      new_prev = 1;
  } else {
    new_num = 0;
    if (num == 1)
      new_prev = 1;
    else
      new_prev = prev + 1;
  }
  if (prev == 0) new_prev = 0;
  new_mask = new_mask & ((1 << 8) - 1);
  f[prev][num][move][mask] +=
      p * 0.01 * dp(new_prev, new_num, move - 1, new_mask);
  new_mask = mask + 1;
  if (k - move >= 8 && mask == ((1 << 8) - 1)) {
    if ((new_mask >> 8) & 1) {
      if (num == 0) {
        new_num = 1;
        new_prev = 1;
      }
      if (num == 1) {
        new_num = 0;
        new_prev = prev;
      }
    }
  } else {
    new_num = num;
    new_prev = prev;
  }
  new_mask = new_mask & ((1 << 8) - 1);
  f[prev][num][move][mask] +=
      (100 - p) * 0.01 * dp(new_prev, new_num, move - 1, new_mask);
  return f[prev][num][move][mask];
}
int main() {
  string s;
  int x, t = 0, num = 0, prev = 0, mask = 0, i, j, k1, l;
  for (i = 0; i < 235; i++) {
    for (j = 0; j <= 1; j++) {
      for (k1 = 0; k1 < 201; k1++) {
        for (l = 0; l < 260; l++) f[i][j][k1][l] = -1;
      }
    }
  }
  cin >> x >> k >> p;
  while (x) {
    t++;
    if (t <= 8) {
      s += x % 2 + '0';
    } else {
      if (t == 9) {
        num = x % 2;
        prev++;
      } else {
        if (num != x % 2) break;
        prev++;
      }
    }
    x /= 2;
  }
  reverse(s.begin(), s.end());
  for (i = 0; i < s.length(); i++) mask = mask * 2 + s[i] - '0';
  cout.precision(10);
  cout << fixed;
  cout << dp(prev, num, k, mask);
}
