#!/bin/python3 import sys from functools import reduce def primesBelow(bound): map = [True for i in range(bound + 1)] r = [] p = 2 while p <= bound: r += [p] for i in range(p, bound + 1, p): map[i] = False while p <= bound and not map[p]: p += 1 return r primes = primesBelow(10**6) def longestSequenceSingle(n): if 1 == n: return 1 factors = [] for p in primes: if n % p == 0: while n % p == 0: factors.append(p) n //= p if 1 != n: factors.append(n) return reduce(lambda e, r: 1 + e*r, factors, 1) def longestSequence(a): # Return the length of the longest possible sequence of moves. return sum(longestSequenceSingle(n) for n in a) if __name__ == "__main__": n = int(input().strip()) a = list(map(int, input().strip().split(' '))) result = longestSequence(a) print(result)