n = int(input())
s = input().split()
for i in range(0, n):
    s[i] = int(s[i])
mx = max(s)
i = mx;
while True:
    f = True
    for j in range(0, n):
        if i % s[j] != 0:
            f = False
            break
    if f is True:
        print(i + 1)
        break;
    i += 1

/**************************************************************
	Problem: 1333
	User: admin
	Language: Python
	Result: Accepted
	Time:98 ms
	Memory:34480 kb
****************************************************************/