x,i,n,k,s,t;main(j){for(scanf("%d%d",&n,&k);n/j?t-=rand()%6-rand(x=k/j++?3:6)%x+x-6,1:(s+=t>1,t=j=i++<1e6););i=!printf("%f",s/1e6);}