#include <bits/stdc++.h>
using namespace std;
int f1(int x) {
  int t = (x & 0xff) + 1, n = (x >> 8) & 0xff, w = x >> 16, i;
  int rc;
  if (t < 0x100)
    rc = (w << 16) | (n << 8) | t;
  else if (w)
    rc = (n << 8) | (t & 0xff);
  else
    rc = 0x10100 | (t & 0xff);
  return rc;
}
int f2(int x) {
  int t = (x & 0xff) << 1, n = (x >> 8) & 0xff, w = x >> 16, i;
  int rc;
  if (t < 0x100)
    rc = w ? 0x100 | t : ((n + 1) << 8) | t;
  else if (w)
    rc = 0x10000 | ((n + 1) << 8) | (t & 0xff);
  else
    rc = 0x10100 | (t & 0xff);
  return rc;
}
double A[2][0x20000];
int F1[0x20000], F2[0x20000];
int main() {
  int x, k, p, i, j, n, n1, w, t, t1;
  double u, v, ans;
  for (i = 0; i < 0x20000; i++) {
    F1[i] = f1(i);
    F2[i] = f2(i);
  }
  scanf("%u%u%u", &x, &k, &p);
  u = (double)p / 100.0;
  v = 1.0 - u;
  w = (x & 0x100) >> 8;
  t = x & 0xff;
  x >>= 8;
  if (w)
    for (n = 0; x & 1; x >>= 1) n++;
  else
    for (n = 1, x >>= 1; x > 0 && ((x & 1) == 0); x >>= 1) n++;
  x = (w << 16) | (n << 8) | t;
  A[0][x] = 1.0;
  for (i = 0; i < k; i++) {
    for (j = 0; j < 0x20000; j++) A[1 - (i & 1)][j] = 0.0;
    for (j = 0; j < 0x20000; j++) {
      A[1 - (i & 1)][F1[j]] += v * A[i & 1][j];
      A[1 - (i & 1)][F2[j]] += u * A[i & 1][j];
    }
  }
  for (ans = 0.0, w = 0; w < 2; w++)
    for (n = 0; n < 256; n++)
      for (t = 0; t < 256; t++) {
        if (t == 0 && w == 0)
          n1 = n + 8;
        else
          for (n1 = 0, t1 = 0x100 | t; (t1 & 1) == 0; t1 >>= 1) n1++;
        ans += A[k & 1][(w << 16) | (n << 8) | t] * n1;
      }
  printf("%.8lf\n", ans);
  return 0;
}
