program prob4
    implicit none
    integer(8) :: n, t, ans, i
    read(*,*) n, ans 

    do i = 2, n
        read(*,*) t
        ans = lcm(ans, t)
    end do

    write(*,*) ans

    stop
contains

integer(8) function gcd(a, b)
    implicit none
    integer(8) :: a, b
    integer(8) :: l, m, n

    m = a
    n = b

    do
    l = mod(m, n)
    if (l == 0) exit
    m = n
    n = l
    end do

    gcd = n

    return
end function gcd

integer(8) function lcm(a, b)
implicit none
    integer(8) :: a, b

    lcm = a / gcd(a, b)
    lcm = lcm * b

end function lcm
end program prob4