P,C=map(int,raw_input().split()) V=[1] for i in range(P): nextV=[] for p in (2,3,5,7,11,13): for v in V: nextV.append(v*p) V=nextV W=[1] for c in range(C): nextW=[] for p in (4,6,8,9,10,12): for v in W: nextW.append(v*p) W=nextW s=0 for v in V: for w in W: s+=v*w print "%.9f"%(s/pow(6.0,C+P))