#!/bin/python3 import sys count=0 def returnMoves(val,orig): global count if val==1: return val i=1 while True: #i is the length of pieces if val%i==0: count+=val//i if not val%(i*2)==0: break i*=2 return count+1 def longestSequence(a): # Return the length of the longest possible sequence of moves. moves=[] for i in a: global count count=0 moves.append(returnMoves(i,i)) return sum(moves) n = int(input().strip()) a = list(map(int, input().strip().split(' '))) result = longestSequence(a) print(result)