n,v=map(int,raw_input().split()) x=z=10**101 exec'x+=x/n-x*x**n/v/z**n/n;'*13 print`n%4`+'.'+`x`[1:-2]