program sample
    implicit none
    character(100)::s,t
    integer(8) :: i,j,k,m,n
    integer(8)::a,b,c,d
    integer(8),allocatable::x(:),y(:)
  
    read(*,*) n
    allocate(x(n))
    do i=1,n
    read(*,*)x(i)
    end do
    a=x(1)
    m=a
    do i=2,n
        b=max(a,x(i))
        a=min(a,x(i))
        do j=1,1000000000
            if(mod(b,a)==0)then
                exit
            else
                c=mod(b,a)
                b=a
                a=c
            end if
        end do
        m=m*(x(i)/a)
        a=m
    end do

    write(*,*)m
    stop
end program sample
  

