def gcd(x,y)
	while y >0
		r =x%y
		x=y
		y=r
	end
	return x
end

def lcm(x,y)
	return x * y / gcd(x,y)
end

a=Array.new
n=gets.chomp.to_i
a=gets.chomp.split(" ").map{|i| i.to_i}

a.sort!{|a, b| b <=> a }


while a.length>=2
	a[1]=lcm(a[0],a[1])
	a.shift
end
puts a[0]