n=int(input())
list_a=list(map(int,input().split()))
B=1
list_b=[]
for i in list_a:
	B*=i
for i in range(1,int(B**0.5)+2):
	if B%i==0:
		list_b.append(i)
		if B//i!=i:
			list_b.append(B//i)
print(sum(list_b)%(10**9+7))