# Enter your code here. Read input from STDIN. Print output to STDOUT ### IMPORTS ### from math import sqrt ### INPUTS ### index = int(input()) arr = list(map(int,input().split())) ### FUNCTIONS ### def oddPrime(a): for x in range(3, int(sqrt(a) + 1), 2): if a % x == 0: return x else: return a ### OUTPUTS ### final = 0 for i in arr: count = value = i while value > 0: if value > 1: if value % 2 == 0: value = int(value / 2) else: value = int(value / oddPrime(value)) count += value else: value = 0 final += count print(final)