#include double calc(int depth,int p,int q){ if(depth>=20){ return 0.5; } double h=1.0/2.0; double t=1.0/3.0; double f=1.0/100.0; if(p<=0){ return t+calc(depth+1,q,q)*t; } else if(p>=100){ return h+calc(depth+1,100-q,q)*h; } return (h+calc(depth+1,p-q,q)*h)*p*f +(t+calc(depth+1,p+q,q)*t)*(100-p)*f; } void run(void){ int p,q; scanf("%d%d",&p,&q); double ans=1.0/3.0+calc(0,p,q)/3.0; printf("%.6lf\n",ans); return; } int main(void){ run(); return 0; }