from math import gcd A,B=map(int,input().split()) G=gcd(A,B) if A==B==0: print(0.25) elif A==0 or B==0: print(0.2912859971) assert G==1 print(0.3371877158)