program answer
  implicit none
  integer(16) :: N, i, ans
  integer(16), allocatable :: T(:)
  read(*,*) N
  allocate(T(N))
  do i = 1, N
     read(*,*) T(i)
  end do

  call koubai(N,T,ans)
  write(*,*) ans

  deallocate(T)
  stop
contains
  subroutine koubai(n,array,ans)
    implicit none
    integer(16) :: i, ans, n, maxyaku, a, b
    integer(16) :: array(n)
    a=array(1)
    do i = 1, n-1
       b=array(i+1)
       call koyaku(a,b,maxyaku)
       a=b/maxyaku*a
    end do
    ans=a
  end subroutine koubai

  subroutine koyaku(a,b,ans)
    implicit none
    integer(16) :: i, a, b, ans, s, t, u
    if(a>b) then
       s=b
       b=a
       a=s
    end if
    s=b
    t=a
    do
       if(mod(s,t)==0) then
          ans=t
          exit
       end if
       u=t
       t=mod(s,t)
       s=u
    end do
  end subroutine koyaku

 end program answer