import fractions
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
def gcd(*numbers):
  return reduce(fractions.gcd,numbers)
g=gcd(*a)
m=1
for i in range(n):
  m*=a[i]
l=m//g
print(l+1)
  
