n,k=map(int,input().split()) a=1/((n+1)*k);ans=0 for i in range(n): ans+=a*n ans+=a*n print(ans)