-- 解説を参照して作った solve x es | x == 1 = e0 | otherwise = solve (x - 1) (e0:es) where e0 = 1 + (foldr (+) 0 (take 6 es)) / 6 main = do x <- (read :: String -> Double) <$> getLine print $ solve x [0.0,0.0,0.0,0.0,0.0,0.0]