$n=<>;$\+=($_/6)**$n*($j*=1-7/$_)for++$j..6;print