#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double EPS = 1e-8;
const double PI = acos(-1);
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
ostream &operator<<(ostream &o, const vector<T> &t) {
  o << '[';
  for (__typeof((t).begin()) i = (t).begin(); i != (t).end(); ++i) {
    if (i != t.begin()) o << ',';
    o << *i;
  }
  return o << ']';
}
template <class S, class T>
ostream &operator<<(ostream &o, const pair<S, T> &t) {
  return o << '(' << t.first << ',' << t.second << ')';
}
template <int N, class Tp>
void out(ostream &, const Tp &) {}
template <int N, class Tp, class, class... Ts>
void out(ostream &o, const Tp &t) {
  if (N) o << ',';
  o << get<N>(t);
  out<N + 1, Tp, Ts...>(o, t);
}
template <class... Ts>
ostream &operator<<(ostream &o, const tuple<Ts...> &t) {
  o << '(';
  out<0, tuple<Ts...>, Ts...>(o, t);
  return o << ')';
}
template <class T>
void output(T *a, int n) {
  for (int i = 0; i < (int)(n); ++i) {
    if (i) cout << ',';
    cout << a[i];
  }
  cout << endl;
}
template <class T>
void output(T *a, int n, int m) {
  for (int i = 0; i < (int)(n); ++i) output(a[i], m);
}
template <class T>
void output(T t) {
  if (t < 0) t = -t, putchar('-');
  static int c[20];
  int k = 0;
  while (t) c[k++] = t % 10, t /= 10;
  if (!k) c[k++] = 0;
  while (k) putchar(c[--k] ^ 48);
}
template <class S, class... T>
void output(S a, T... t) {
  output(a);
  putchar(' ');
  output(t...);
}
template <class T>
bool input(T &t) {
  t = 0;
  int n = 0, c;
  while (~(c = getchar()) && !isdigit(c) && c != '-')
    ;
  if (!~c) return 0;
  if (c == '-')
    n = 1;
  else
    t = c ^ 48;
  while (isdigit(c = getchar())) t = 10 * t + c - '0';
  t = n ? -t : t;
  return 1;
}
template <class S, class... T>
bool input(S &a, T &...t) {
  input(a);
  return input(t...);
}
double dp[2][1 << 8][2][250];
int pt[250];
int main() {
  pt[0] = 1;
  for (int i = 0; i < (int)(240); ++i) pt[i + 1] = min(202, pt[i] * 2);
  int x, n, P;
  while (input(x, n, P)) {
    double p = 0.01 * P;
    memset(dp, 0, sizeof(dp));
    int cnt = 0;
    if (x >> 8) {
      for (int i = 8;; ++i) {
        if ((x >> i & 1) ^ (x >> 8 & 1)) break;
        cnt++;
      }
    }
    dp[0][x & ((1 << 8) - 1)][x >> 8 & 1][cnt] = 1;
    for (int i = 0; i < (int)(n); ++i) {
      int cur = i & 1;
      int nxt = i + 1 & 1;
      for (int S = 0; S < (int)(1 << 8); ++S)
        for (int j = 0; j < (int)(2); ++j)
          for (int k = 0; k < (int)(250); ++k) dp[nxt][S][j][k] = 0;
      for (int S = 0; S < (int)(1 << 8); ++S)
        for (int j = 0; j < (int)(2); ++j)
          for (int k = 0; k < (int)(249); ++k) {
            dp[nxt][(S << 1) & ((1 << 8) - 1)][S >> 7][(S >> 7) ^ j ? 1
                                                       : k          ? k + 1
                                                                    : 0] +=
                dp[cur][S][j][k] * p;
            int nj = (((S + 1) >> 8) + j) & 1;
            int nk = (nj == j ? k : j ? k : 1);
            dp[nxt][(S + 1) & ((1 << 8) - 1)][nj][nk] +=
                dp[cur][S][j][k] * (1 - p);
          }
    }
    double ans = 0;
    for (int j = 0; j < (int)(2); ++j) {
      for (int S = 0; S < (int)(1 << 8); ++S) {
        for (int k = 0; k < (int)(250); ++k) {
          double q = dp[n & 1][S][j][k];
          if (S) {
            ans += q * __builtin_ctz(S);
          } else {
            if (j) {
              ans += q * 8;
            } else {
              if (k) ans += q * (8 + k);
            }
          }
        }
      }
    }
    printf("%.10f\n", ans);
  }
}
