import fractions

N = int(eval(input()))

T = [int(eval(input())) for i in range(N)]

ans = T[0]



for i in range(1, N):

    ans = (ans * T[i]) // (fractions.gcd(ans, T[i]))

    

print(ans)

#https://mathtrain.jp/abequalgl
N = int(eval(input()))

T = sorted([int(eval(input())) for i in range(N)])



def gcd(a, b):

    while b != 0:

        a, b = b,a%b

    return a



if N == 1:

    print((T[0]))

else:

    ans = T[0]

    for i in range(1, N):

        ans = (ans*T[i])//(gcd(ans, T[i]))

    

    print(ans)
import fractions

N = int(eval(input()))
T = [int(eval(input())) for i in range(N)]
ans = T[0]
for i in range(1, N):
    ans = (ans * T[i]) // (fractions.gcd(ans, T[i]))
print(ans)
# https://mathtrain.jp/abequalgl

N = int(eval(input()))
T = sorted([int(eval(input())) for i in range(N)])


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


if N == 1:
    print((T[0]))
else:
    ans = T[0]
    for i in range(1, N):
        ans = (ans * T[i]) // (gcd(ans, T[i]))
    print(ans)

-import fractions +N = int(eval(input())) +T = sorted([int(eval(input())) for i in range(N)]) -N = int(eval(input())) -T = [int(eval(input())) for i in range(N)] -ans = T[0] -for i in range(1, N): -    ans = (ans * T[i]) // (fractions.gcd(ans, T[i])) -print(ans) -# https://mathtrain.jp/abequalgl + +def gcd(a, b): +    while b != 0: +        a, b = b, a % b +    return a + + +if N == 1: +    print((T[0])) +else: +    ans = T[0] +    for i in range(1, N): +        ans = (ans * T[i]) // (gcd(ans, T[i])) +    print(ans)