#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, u;
double p, f[210][270][250][2], x;
int main() {
  scanf("%d%d%lf", &n, &m, &p);
  p = 1. * p / 100;
  int A = n & 255, B = n / 256, C = 0;
  if (B & 1) {
    for (i = 0; i <= 40; i++)
      if (B >> i & 1)
        C++;
      else
        break;
    f[0][A][C][1] = 1;
  } else {
    for (i = 0; i <= 40; i++)
      if (!(B >> i & 1))
        C++;
      else
        break;
    if (!B) C = 0;
    f[0][A][C][0] = 1;
  }
  for (i = 1; i <= m; i++)
    for (j = 0; j <= 255; j++)
      for (k = 0; k <= 240; k++)
        for (u = 0; u <= 1; u++)
          if (x = f[i - 1][j][k][u]) {
            int a = j * 2, b = a / 256, c = a & 255;
            if (b) {
              if (!u)
                f[i][c][1][1] += x * p;
              else
                f[i][c][k + 1][1] += x * p;
            } else {
              if (!u)
                f[i][c][k + 1][0] += x * p;
              else
                f[i][c][1][0] += x * p;
            }
            a = j + 1, b = a / 256, c = a & 255;
            if (b) {
              if (!u)
                f[i][c][1][1] += x * (1 - p);
              else
                f[i][c][k][0] += x * (1 - p);
            } else
              f[i][c][k][u] += x * (1 - p);
          }
  double an = 0;
  for (i = 0; i <= 255; i++)
    for (j = 0; j <= 240; j++) {
      for (k = 0; k <= 7; k++)
        if (i >> k & 1) break;
      an += f[m][i][j][1] * k;
      if (k == 8)
        an += f[m][i][j][0] * (k + j);
      else
        an += f[m][i][j][0] * k;
    }
  printf("%.11lf\n", an);
  return 0;
}
