#!/bin/python3 import sys def longestSequence(a): result = [] for x in a: if x != 1: ok = x z = int(x**0.5)+1 total = x flag = False for y in range(2,z+1): while ok%y == 0: if ok//y == 1: total +=1 else: total += ok//y ok = ok//y flag = True if flag: if ok != 1: total += 1 result.append(total) else: l = x + 1 result.append(l) else: result.append(1) return sum(result) #!/bin/python3 if __name__ == "__main__": n = int(input().strip()) a = list(map(int, input().strip().split(' '))) sonuc = longestSequence(a) print(sonuc)