import           Control.Applicative
import           Control.Monad
import           Data.List
import           Text.Printf

gcd' :: Integer -> Integer -> Integer
gcd' a 0 = a
gcd' a b = gcd' b (a `mod` b)

lcm' :: Integer -> Integer -> Integer
lcm' a b = a * b `quot` (gcd' a b)

main = do
  n <- getLine
  a <- map (read::String->Integer) . words <$> getLine
  print $ foldl lcm' 1 a
