int s,i,t;main(k){for(scanf("%d",&k);i++<1e5;)for(;--t<0?t=k:t;s++)t-=rand()%6;s=!printf("%f",s/1e5);}