{-# LANGUAGE BangPatterns #-}

main :: IO ()
main = do
  getLine
  as <- map read . words <$> getLine
  print $ solve as

solve :: [Double] -> Double
solve = go 0.0
  where
    go !rsum []     = recip rsum
    go !rsum (a:as) = go (rsum + recip a) as