{-# LANGUAGE TypeApplications #-}

import           Control.Monad
import           Control.Applicative
import           Data.List
import           Data.Char
import           Control.Arrow
import           Data.Bits


main = do
  getLine
  print
    .   fromRational
    .   recip
    .   sum
    .   map (recip . toRational . (read @Int))
    .   words
    =<< getLine
