import numpy as np import collections N,p = input().split() N = int(N); p = float(p) dp = np.zeros(N+1, np.int32) for i in range(2,N+1): dp[i:N+1:i]+=1 ans = 0 c = collections.Counter(dp) for v,n in c.most_common(): if v == 0: continue ans += n*(1-p)**(v-1) print(ans)