# ==================== gcd   最大公約数

from fractions import gcd



# ==================== gcd   最小公倍数

def lcm(a, b):

    return  a//gcd(a, b) * b





n=int(eval(input()))

t=[]

for i in range(n):

    t.append(int(eval(input())))

             

if n==1:

    print((t[0]))

else:

    tlcm=t[0]

    for i in range(1,n):

        tlcm=lcm(tlcm,t[i])

    print(tlcm)

    
from fractions import gcd

#from math import gcd



n=int(eval(input()))

lcm=int(eval(input()))

for i in range(n-1):

    ti=int(eval(input()))

    lcm= lcm//gcd(lcm, ti) * ti

print(lcm)
# ==================== gcd   最大公約数
from fractions import gcd

# ==================== gcd   最小公倍数
def lcm(a, b):
    return a // gcd(a, b) * b


n = int(eval(input()))
t = []
for i in range(n):
    t.append(int(eval(input())))
if n == 1:
    print((t[0]))
else:
    tlcm = t[0]
    for i in range(1, n):
        tlcm = lcm(tlcm, t[i])
    print(tlcm)

from fractions import gcd

# from math import gcd
n = int(eval(input()))
lcm = int(eval(input()))
for i in range(n - 1):
    ti = int(eval(input()))
    lcm = lcm // gcd(lcm, ti) * ti
print(lcm)

-# ==================== gcd   最大公約数 -# ==================== gcd   最小公倍数 -def lcm(a, b): -    return a // gcd(a, b) * b - - +# from math import gcd -t = [] -for i in range(n): -    t.append(int(eval(input()))) -if n == 1: -    print((t[0])) -else: -    tlcm = t[0] -    for i in range(1, n): -        tlcm = lcm(tlcm, t[i]) -    print(tlcm) +lcm = int(eval(input())) +for i in range(n - 1): +    ti = int(eval(input())) +    lcm = lcm // gcd(lcm, ti) * ti +print(lcm)