module Main where
    import Data.List
    import Data.List.Split    
    import Control.Monad
    
    main = do
        lines<-getLines
        let clocks =map readInteger (tail lines)
        print $ foldr getLCM 1 clocks

    readInteger s = read s ::Integer

    getLines = do
        lines<-getContents
        return (splitOn "\n" lines)

    getGCD::Integer->Integer->Integer
    getGCD m n 
        | m < n = (getGCD n m)
        | n == 0 = m
        | otherwise = getGCD (mod m n) n

    getLCM::Integer->Integer->Integer
    getLCM m n =ceiling $ (fromIntegral (m * n)) / (fromIntegral (getGCD m n))

