program main
	implicit none
	integer i,n
	integer(8)t(100),a,b,x
	read(*,*)n
	do i=1,n
		read(*,*)t(i)
	enddo
	if(n==1)then
		write(*,*)t(1)
	else
		a=t(1)
		b=t(2)
		do i=1,n-1
			x=a*b/euc(a,b)
			a=x
			b=t(i+2)
		enddo
		write(*,'(i0)')x
	endif
contains
function euc(a,b)
	integer*8 a,b,x,euc
	if(a<b)then
		x=a
		a=b
		b=x
	endif
	do
		x=mod(a,b)
		if(x==0)exit
		a=b
		b=x
	enddo
	euc=b
end function
end program main
