<>;$a+=($x=.9**++$n)*2**($_/800)for<>;print 1154*log($a/($t=1-$x)/9)+357-357/$t*sqrt(1-$x**2)