program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int64):: n,ans,t,i

    read*, n
    read*, ans

    do i=2,n
        read*, t
        ans=lcm(ans,t)
    end do
    print'(i0)', ans
contains
    function lcm(x,y) result(ret)
        integer(int64):: x,y,ret
        ret = x/gcd(x,y)*y
    end function

    recursive function gcd(x,y) result(ret)
        integer(int64)::x,y,ret

        if (mod(x,y)==0)then
            ret=y
            return
        end if
        ret=gcd(y,mod(x,y))
    end function
end program name