program prob4
    implicit none
    integer::n
    integer(16)::t, ans, a, b, c
    read(*,*) n
    read(*,*) t
    ans = t
    do i = 2, n
        read(*,*) t
        a = ans
        b = t
        c = mod(a,b)
        do while(c > 0)
            a = b
            b = c
            c = mod(a,b)
        end do
        ans = ans/b*t
    end do
    write(*,*) ans
    stop
end program