import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T

main :: IO ()
main = do
  n <- unsafeTextToInt <$> T.getLine :: IO Int
  as <- map unsafeTextToRational . T.words <$> T.getLine :: IO [Rational]
  let
    s = fromRational . recip . sum . map recip $ as :: Double
  print s

unsafeTextToRational :: T.Text -> Rational
unsafeTextToRational s = case T.rational s of
  Right (x, _) -> x
{-# INLINE unsafeTextToRational #-}

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
