#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;

#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define fi first
#define se second

#define INF 2147483600

double v[101];
double s[101];

int main(){
  int p,q;
  cin>>p>>q;

  double res=1./3.;

  fill(v, v+101, 0.);
  v[p]=1./3.;

  double *nxt, *prev;

  prev = v;
  nxt = s;
  rep(reps, 1000){
    fill(nxt, nxt+101, 0.);
    rep(i,101){
      if(prev[i]>0){
        res += prev[i]*(i/600. + 1./3.);
        nxt[max(i-q,0)] += prev[i]*i/200.;
        nxt[min(i+q,100)]+=prev[i]*(100-i)/300.;
      }
    }
    swap(prev, nxt);
  }

  printf("%.7lf\n", res);

  return 0;
}