double p,x;ll n,a[2d6];{rd(n,p);rep(i,2,n+1)x+=(1-p)**a[i],++a[(2..n/i)*i];wt(x);}