<>;$a+=.9**++$i*2**($_/800)for<>;print 800*log($a/(9-9*.9**--$.))/log(2)+357-155.7/(1-.9**$.)*sqrt+(1-.81**$.)/.19