import Text.Printf main = do k <- readLn let f :: Float -> Float f x | x <= 0 = 0.0 | otherwise = sum (map ((/6) . f . (`subtract` x)) [1..6]) + 1 in printf "%.6f\n" (f k)