#include <bits/stdc++.h>
using namespace std;
double memo[204][(1 << 8)][2][250];
int lastEightBits(int x) {
  int ret = 0;
  return x % 256;
}
int ctCon(int num, int on, int con) {
  if (num == 0) {
    if (con == 0)
      return 0;
    else if (on == 1)
      return 8;
    else {
      return 8 + con;
    }
  } else {
    int ret = 0;
    for (int i = 0; i < 8; i++) {
      if ((num & (1 << i)) == 0) {
        ret++;
      } else
        break;
    }
    return ret;
  }
}
int main(void) {
  int x, k, p;
  scanf("%d", &x);
  scanf("%d", &k);
  scanf("%d", &p);
  for (int i = 0; i <= k; i++)
    for (int j = 0; j < 256; j++)
      for (int l = 0; l < 2; l++)
        for (int m = 0; m < 250; m++) memo[i][j][l][m] = -1.0;
  int cur = lastEightBits(x);
  int on = ((x & (1 << 8)) != 0);
  int consecutive = 0;
  if (x > 255) {
    int ct = 8;
    while (x >= (1 << ct)) {
      if (on && (x & (1 << ct))) {
        consecutive++;
      } else if (!on && !(x & (1 << ct))) {
        consecutive++;
      } else
        break;
      ct++;
    }
  }
  assert(on <= 1);
  memo[0][cur][on][consecutive] = 1.0;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < 256; j++) {
      for (int l = 0; l < 2; l++) {
        for (int m = 0; m < 250; m++) {
          if (memo[i][j][l][m] <= 0.0) continue;
          int nxtnum, nxtEight, isOn, con;
          if (j == 255) {
            nxtEight = 0;
            if (l == 0) {
              isOn = 1;
              con = 1;
            } else {
              isOn = 0;
              con = m;
            }
            if (memo[i + 1][0][isOn][con] <= 0) {
              memo[i + 1][0][isOn][con] =
                  1.0 * (100 - p) / 100 * memo[i][j][l][m];
            } else {
              memo[i + 1][0][isOn][con] +=
                  1.0 * (100 - p) / 100 * memo[i][j][l][m];
            }
          } else {
            if (memo[i + 1][j + 1][l][m] <= 0.0)
              memo[i + 1][j + 1][l][m] =
                  1.0 * (100 - p) / 100 * memo[i][j][l][m];
            else {
              memo[i + 1][j + 1][l][m] +=
                  1.0 * (100 - p) / 100 * memo[i][j][l][m];
            }
          }
          nxtnum = (j << 1);
          nxtEight = lastEightBits(nxtnum);
          isOn = ((nxtnum & (1 << 8)) != 0);
          con = m;
          if (l == isOn) {
            if (con > 0) con = m + 1;
          } else {
            con = 1;
          }
          if (memo[i + 1][nxtEight][isOn][con] <= 0.0) {
            memo[i + 1][nxtEight][isOn][con] = 1.0 * p / 100 * memo[i][j][l][m];
          } else {
            memo[i + 1][nxtEight][isOn][con] +=
                1.0 * p / 100 * memo[i][j][l][m];
          }
        }
      }
    }
  }
  double ret = 0.0;
  for (int i = 0; i < 256; i++) {
    for (int j = 0; j < 2; j++) {
      for (int l = 0; l < 250; l++) {
        if (memo[k][i][j][l] > 0.0) {
          ret += memo[k][i][j][l] * ctCon(i, j, l);
        }
      }
    }
  }
  printf("%.10lf\n", ret);
  return 0;
}
