double s,p;n,j,x[2<<20];main(i){for(scanf("%d%lf",&n,&p);n/++i;s+=pow(1-p,x[i]))for(j=i;j