CodeEff/ECCO huggingface dataset:
# Original solution
ans = 0
N = int(eval(input()))
a = list(map(int, input().split()))
for n in a:
    while not n % 2:
        ans += 1
        n //= 2
print(ans)

# Optimized solution
import sys

input = sys.stdin.readline

def main():
    N = int(eval(input()))
    
    ans = 0
    
    for a in list(map(int, input().split())):
        while not a % 2:
            ans += 1
            a //= 2
    print(ans)
    
if __name__ == '__main__':
    main()
# Original solution
# encoding: utf-8
N = int(eval(input()))
a = list(map(int, input().split()))

ans = 0
for ai in a:
    ai_tmp = ai
    ans_tmp = 0
    for i in range(32):
        if ai_tmp % 2: break
        else:
            ans_tmp += 1
            ai_tmp = ai_tmp // 2
    ans += ans_tmp

print(ans)

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))

ans = 0
for i, ai in enumerate(a):
    ai_tmp = ai
    while ai_tmp % 2 == 0:
        ans += 1
        ai_tmp >>= 1

print(ans)
# Original solution
eval(input());print((sum(bin(int(x))[::-1].index('1')for x in input().split())))

# Optimized solution
_,a=open(0);print((sum(bin(int(x))[::-1].index('1')for x in a.split())))
# Original solution
def resolve():
  n = int(eval(input()))
  ans = 0
  a = list(map(int, input().split()))
  for v in a:
    while v%2 == 0:
      v //= 2
      ans += 1
  print(ans)
  return

if __name__ == "__main__":
  resolve()


# Optimized solution
def calc(x):
  ans = 0
  while (x % 2 == 0):
    ans += 1
    x //= 2
  return ans

def resolve():
  n = int(eval(input()))
  a = list(map(int, input().split()))
  ans = 0
  for x in a:
    ans += calc(x)
  print(ans)
  return

if __name__ == "__main__":
  resolve()
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

a = sorted([i for i in a if i%2==0])
x = 0
ans = 0
while len(a)!=0 and a[-1]%2==0:
    if a[x] % 2 != 0:
        x += 1
    a[x] = a[x]//2
    ans += 1
print(ans)


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

ans = 0

for i in a:
    while i%2==0:
        ans += 1
        i = i//2
print(ans)
# Original solution
n = int(eval(input()))
a = sorted(list(map(int,input().split())),reverse=True)
count = 0
while True:
    cnt = 0
    ccnt = 0
    done = 0
    for i in range(n):
        if a[i] % 2 == 0:
            if done == 0:
                a[i] = a[i] // 2
                cnt += 1
                done += 1
            else:
                a[i] = a[i] * 3
                ccnt += 1
        else:
            a[i] = a[i] * 3
            ccnt += 1
    if cnt  == 0:
        break
    else:
        count += 1
print(count)  

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
cnt = 0
for i in range(n):
    while a[i] % 2==0:
        a[i] /= 2
        cnt += 1
print(cnt)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

seki = 1

for a_i in A:
        seki *= a_i

count = 0

while seki % 2 == 0:
        seki = seki // 2
        count += 1

print(count)

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
'''
seki = 1

for a_i in A:
        seki *= a_i

count = 0

while seki % 2 == 0:
        seki = seki // 2
        count += 1
'''

count = 0

for a_i in A:
        while a_i % 2 == 0:
                a_i = a_i // 2
                count += 1
print(count)
# Original solution
n = int(eval(input()))

a = list(map(int, input().split()))

def mul3(n):
    return n*3

count = 0
while any([a[i] % 2 == 0 for i in range(n)]):
    a = list(map(mul3, a))
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] //= 6
            break
    count += 1
print(count)


# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
c=0
for i in a:
    while i%2==0:i,c=i/2,c+1
print(c)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
cnt = 0
for i in a:
    t = i
    while True:
        if t % 2 == 0:
            t //= 2
            cnt += 1
        else:
            break
print(cnt)


# Optimized solution
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = list(map(int, input().rstrip('\n').split()))
    cnt = 0
    for i in range(n):
        t = a[i]
        while True:
            if t % 2 == 0:
                cnt += 1
                t //= 2
            else:
                break
    print(cnt)


if __name__ == '__main__':
    slove()
# Original solution
N = int(eval(input()))
a = list(map(int,input().split()))
ans = 0
for i in range(10**9):
    a.sort(reverse=True)
    cnt = 0
    for j in range(N):
        if a[j]%2 == 0 and cnt == 0:
            a[j] //= 2
            cnt = 1
        else:
            a[j] *= 3
    if cnt == 0:
        print(ans)
        exit()
    else:
        ans +=1

# Optimized solution
N = int(eval(input()))
a = list(map(int,input().split()))
ans = 0
for i in range(N):
    while a[i] % 2 == 0:
        a[i] //= 2
        ans += 1
print(ans)
# Original solution
import math

n = int(eval(input()))
li = [int(x) for x in input().split()]
ans = 0
isAvailable = False
for a in li:
    if a % 2 == 0:
        isAvailable = True
        for _ in range(a):
            if a % 2 == 0:
                a /= 2
                ans += 1
if isAvailable:
    print(ans)
else:
    print((0))


# Optimized solution
import math

n = int(eval(input()))
li = [int(x) for x in input().split()]
ans = 0
isAvailable = False
for a in li:
    if a % 2 == 0:
        isAvailable = True
        while(a % 2 == 0):
            a /= 2
            ans += 1
if isAvailable:
    print(ans)
else:
    print((0))
# Original solution
n = int(eval(input()))
arr = list(map(int,input().split()))
ans = 0
def odd(arr):
    for i in arr:
        if i % 2 == 0:
            return True
            break
    return False

while odd(arr):
    maxOdd = max(list([x for x in arr if x % 2 == 0]))
    arr[arr.index(maxOdd)] = arr[arr.index(maxOdd)] // 2
    arr = list(map(int,arr))
    arr = list([arr * 3 for arr in arr])
    ans += 1

print(ans)

# Optimized solution
n = int(eval(input()))
arr = list(map(int,input().split()))
ans = 0

def div(x):
    cnt = 0
    while x % 2 == 0:
        x = x // 2
        cnt += 1
    return cnt

for i in arr:
    if i % 2 == 0:
        ans += div(i)
print(ans)
# Original solution
from copy import deepcopy

n = int(eval(input()))
a = list(map(int,input().split()))

counter = 0
while(True):
    b = deepcopy(a)
    undivided = True
    for i,v in enumerate(b):
        if v%2 is 0 and undivided:
            a[i] = v//2
            undivided = False
        else:
            a[i] = v*3
    if undivided:
        break
    else:
        counter += 1
print(counter)

# Optimized solution
#!/usr/bin/env python
N = int(eval(input()))
A = [int(i) for i in input().split()]
ans = 0
for a in A:
    while a % 2 != 1:
        ans += 1
        a /= 2
print(ans)
# Original solution
#!/usr/bin/env python
N = int(eval(input()))
A = [int(i) for i in input().split()]
ans = 0
for a in A:
    while a % 2 != 1:
        ans += 1
        a /= 2
print(ans)

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
ans = 0
for v in a:
    while v%2 == 0:
        ans += 1
        v /= 2
print(ans)
# Original solution
input = open(0).read

N, *an = list(map(int, input().split()))


def main():
    ans = 0

    for i in range(N):
        tmp = 0
        while an[i]:
            if an[i] % 2:
                break
            else:
                tmp += 1
                an[i] //= 2

        ans += tmp

    print(ans)
    return


main()


# Optimized solution
def main():
    N, *a = list(map(int, open(0).read().split()))
    print((sum([bin(ai)[::-1].index("1") for ai in a])))
    return


main()
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

SUM = 0
for i in A:
    count = 0
    while i%2 == 0:
        i = i/2
        count += 1
    SUM+=count
print(SUM)

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))

SUM = 0
for i in A:
    count = 0
    while i%2 == 0:
        i//=2
        count += 1
    SUM+=count
print(SUM)
# Original solution
lst = [2184, 2126, 1721, 1800, 1024, 2528, 3360, 1945, 1280, 1776]
n = eval(input())
lst = [int(e) for e in input().split()]
count = 0
f = True
while(f):
    f = False
    for i in range(len(lst)):
        if(lst[i]%2 == 0):
            m = i
            f = True
            break

    if(f):
        count += 1
    else:
        break

    for i in range(len(lst)):
        if (lst[i]%2 == 0)and(lst[i] > lst[m]):
            m = i

    for i in range(len(lst)):
        if (i == m):
            lst[i] = int(lst[i]/2)
        else:
            lst[i] *= 3 
print(count)

# Optimized solution
n = eval(input())
lst = [int(e) for e in input().split()]

count = 0
m = 0
f = True
while(f):
    f = False
    for i in range(m,len(lst)):
        if(lst[i]%2 == 0):
            m = i
            f = True
            break
    if(f):
        count += 1
    else:
        break

    lst[m] = int(lst[m]/2)

print(count)
# Original solution
n = int(input())
m = list(map(int, input().split()))
total = 0
for i in range(n):
    x = m[i]
    while True:
        if x % 2 == 1:
            break
        total += 1
        x = x // 2
 
print(total)

# Optimized solution
def meu_map(l):
    for i in range(len(l)):
        l[i] = int(l[i])


n = int(input())
array = input().split()

meu_map(array)

fatores = 0
for e in array:
    while e != 1:
        if e % 2 == 0:
            e /= 2
            fatores += 1
        else:
            break

print(fatores)
# Original solution
import os, sys, re, math

n = int(eval(input()))
a = list(map(int,input().split(' ')))


cnt = 0
while True:
    a.sort(reverse=True)
    if (sum([x % 2 for x in a])) == n:
        break
    flg = False
    for i in range(n):
        if a[i] % 2 == 0 and flg == False:
            a[i] = a[i] // 2
            flg = True
        else:
            a[i] = a[i] * 3
    cnt += 1

print(cnt)


# Optimized solution
import os, sys, re, math

n = int(eval(input()))
a = list(map(int,input().split(' ')))


cnt = 0
for ai in a:
    while ai % 2 == 0:
        cnt += 1
        ai = ai // 2
print(cnt)
# Original solution
import sys

sys.stdin.readline()
a = list(map(int, sys.stdin.readline().split()))

a = [x for x in a if x % 2 == 0]

cnt = 0
while a:
    a.sort(reverse=True)
    if a[0] % 2 == 0:
        a[0] //= 2
        if a[0] % 2 != 0:
            del a[0]
        cnt += 1
    else:
        break

print(cnt)

# Optimized solution
import math
import sys

sys.stdin.readline()
a = list(map(int, sys.stdin.readline().split()))

a = [x for x in a if x % 2 == 0]

cnt = 0
for x in a:
    while x % 2 == 0:
        x //= 2
        cnt += 1

print(cnt)
# Original solution
from collections import Counter

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return Counter(a)

N = int(eval(input()))
a = list(map(int, input().split()))

ans = 0

for i in a:
    ans += prime_factorize(i)[2]
print(ans)

# Optimized solution
from collections import Counter

def prime_factorize(n):
    a = 0
    while n % 2 == 0:
        a += 1
        n //= 2
    return a

N = int(eval(input()))
a = list(map(int, input().split()))

ans = 0

for i in a:
    ans += prime_factorize(i)
print(ans)
# Original solution
N = int(eval(input()))
a = list(map(int,input().split()))
result = 0
for i in a:
	while True:
		if i%2!=0:
			break
		else:
			i/=2
			result += 1
print(result)

# Optimized solution
n = int(eval(input()))
a = list(map(int,input().split()))
p = 0
for i in a:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i //= 2
    p += cnt
print(p)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))

e = 0
for a in A:
    while a&1 == 0:
        e += 1
        a >>= 1
print(e)

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))

e = 0
for a in A:
    l = 0
    over = a.bit_length()
    while over - l > 1:
        m = (l+over) // 2
        if a % (1<<m) == 0: l = m
        else: over = m
    e += l
print(e)
# Original solution
n = int(eval(input()))
ni = list(map(int, input().split()))
cnt = 0
for i in ni:
  while not i % 2:
    i /= 2
    cnt += 1
print(cnt)

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))
 
def f(n):
  cnt = 0
  while(n%2==0):
    n = n//2
    cnt +=1
  return cnt
 
total = 0
for e in a:
  total += f(e)
print(total)
# Original solution
n = int(eval(input()))
ni = list(map(int, input().split()))
cnt = 0
for i in ni:
  while (i % 2==0):
    i /= 2
    cnt += 1
print(cnt)


# Optimized solution
n = int(eval(input()))
ni = list(map(int, input().split()))
cnt = 0
for i in ni:
  while ( i % 2==0):
    i //= 2
    cnt += 1
print(cnt)
# Original solution
n = int(eval(input()))
ni = list(map(int, input().split()))
cnt = 0
for i in ni:
  while ( i % 2==0):
    i //= 2
    cnt += 1
print(cnt)


# Optimized solution
n = int(eval(input()))
ni = list(map(int, input().split()))

def f(i):
  cnt = 0
  while not i%2:
    i //= 2
    cnt += 1
  return cnt
total = 0
for i in ni:
  total += f(i)
print(total)
# Original solution
n = int(eval(input()))
ni = list(map(int, input().split()))

total = 0
for i in ni:
  while not i%2:
    i //= 2
    total += 1
print(total)

# Optimized solution
if __name__ == '__main__':
  n = int(eval(input()))
  ni = list(map(int, input().split()))

  total = 0
  for i in ni:
    while not i%2:
      i //= 2
      total += 1
  print(total)
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
while(any([ai % 2 == 0 for ai in a])):
    ans += 1
    for i in range(n):
        ai = a[i]
        if ai % 2 == 0:
            a[i] = ai // 2
            break
print(ans)


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    x = 0
    ai = a[i]
    while(ai%2==0):
        ai = ai//2
        x+=1
    ans+=x
print(ans)
# Original solution
N, *a = list(map(int, open(0).read().split()))
ans = 0
flag = True
while flag:
    cnt = 0
    for i in range(N):
        if a[i] % 2 == 0 and cnt == 0:
            a[i] //= 2
            cnt += 1
        else:
            a[i] *= 3
    else:
        if cnt == 0:
            flag = False
        else:
            ans += 1

print(ans)


# Optimized solution
N, *a = list(map(int, open(0).read().split()))
ans = 0
for i in range(N):
    ans += len(bin(a[i])) - bin(a[i]).rfind('1') - 1
print(ans)
# Original solution
N, *a = list(map(int, open(0).read().split()))
ans = 0
flag = True
while flag:
    cnt = 0
    for i in range(N):
        if a[i] % 2 != 0:
            continue
        elif a[i] % 2 == 0 and cnt == 0:
            a[i] //= 2
            cnt += 1
            break

    if cnt == 0:
        flag = False
    else:
        ans += 1

print(ans)


# Optimized solution
N, *a = list(map(int, open(0).read().split()))
ans = 0
for i in range(N):
    while a[i] % 2 == 0:
        a[i] //= 2
        ans += 1

print(ans)
# Original solution
answer = 0
N = int(eval(input()))
A = list(map(int,input().split()))
for i in range(N) :
    while A[i] % 2 == 0 :
        A[i] = A[i] / 2
        answer += 1
print(answer)



# Optimized solution
N = int(eval(input()))
L = list(map(int,input().split()))

ans = 0
for i in range(N) :
    flag = 0
    while flag == 0 :
        if (L[i] % 2) == 0 :
            ans += 1
            L[i] = L[i]//2
        else :
            flag = 1
print(ans)
# Original solution
N = int(eval(input()))
L = list(map(int,input().split()))

ans = 0
for i in range(N) :
    flag = 0
    while flag == 0 :
        if (L[i] % 2) == 0 :
            ans += 1
            L[i] = L[i]//2
        else :
            flag = 1
print(ans)


# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))

ans = 0
for i in range(len(A)) :
    while True :
        if A[i] % 2 != 0 :
            break
        ans += 1
        A[i] //= 2
print(ans)
# Original solution
iN = int(eval(input()))

def parse2(a):
    i = 0
    while a % 2 == 0:
        i+=1
        a //= 2
    return i

print((sum([parse2(int(_)) for _ in input().split()])))


# Optimized solution
iN = int(eval(input()))
def parse2(a):
    i = 0
    while a % 2 == 0:
        i+=1
        a >>= 1
    return i
print((sum(parse2(_) for _ in map(int,input().split()))))
# Original solution
n = int(eval(input()))
A = [int(s) for s in input().split()]
i = 0
flag = 0
count = 0
while i < len(A):
  
  
  if A[i] %2 == 0:
    flag = 0
    A[i] = A[i] /2
    count += 1
    i = 0
    
    continue
  else:
    flag += 1
    if flag == len(A):
      print(count)
      exit()
    i += 1
  

  
  
  
    


# Optimized solution
import math
n = int(eval(input()))
A = [int(s) for s in input().split()]
i = 0
flag = 0
count = 0
sum = 0


def bynum(x):
  count = 0
  while True:
    if x % 2 == 0:
      x = x / 2
      count += 1
    else:
      return count

for a in A:
  sum += bynum(a)

print(sum)


    



"""
while i < len(A):
  if A[i] %2 == 0:
    flag = 0
    A[i] = A[i] /2
    count += 1
    i = 0
    
    continue
  else:
    flag += 1
    if flag == len(A):
      print(count)
      exit()
    i += 1
  """
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))

cnt = 0
for a in A:
  while a%2 == 0:
    a //= 2
    cnt += 1
print(cnt)

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))

cnt = 0
for a in A:
  #print(format(a,'b')[::-1])
  #print(format(a,'b')[::-1].index('1'))
  cnt += format(a,'b')[::-1].index('1')
print(cnt)
# Original solution
def log2(n):
    n = int(n)
    cnt = 0
    while ~n & 1:
        cnt += 1
        n >>= 1
    return cnt


N = int(eval(input()))
print((sum(map(log2, input().split()))))


# Optimized solution
def log2(n):
    cnt = 0
    while n % 2 == 0:
        cnt += 1
        n //= 2
    return cnt


N = int(eval(input()))
print((sum([log2(int(x)) for x in input().split()])))
# Original solution
N = int(eval(input()))
a = list(map(int, input().split()))

def factorization(n):
    arr, temp = [], n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

fac = [0] * N
for i in range(N):
    if a[i]%2==0:
        arr = factorization(a[i])
        fac[i] = arr[0][1]

print((sum(fac)))

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))

def factorization(n):
    cnt = 0
    while n%2==0:
        n /= 2
        cnt += 1
    return cnt

fac = [0] * N
for i in range(N):
    if a[i]%2==0:
        fac[i] = factorization(a[i])

print((sum(fac)))
# Original solution
# -*- coding: utf-8 -*-


def can_div2(a):
    for i in range(len(a)):
        if a[i] % 2 == 0:
            a[i] /= 2
            return True
    else:
        return False

N = int(eval(input()))
a = list(map(int, input().split()))

c = 0

while(can_div2(a)):
   c += 1 

print(c)

# Optimized solution
# -*- coding: utf-8 -*-

N = int(eval(input()))
a = list(map(int, input().split()))

c = 0
for i in range(N):
    while a[i] % 2 == 0:
        a[i] /= 2
        c += 1

print(c)
# Original solution
from functools import reduce
n = int(eval(input()))
num = reduce(lambda x,y: x*y, list(map(int, input().split())))
count = 0

while num%2 == 0:
    num = num//2
    count += 1
    
print(count)

# Optimized solution
n = int(eval(input()))
nums = list(map(int, input().split()))
iters = 0
count = 0

while len(nums) != 0:
    size = len(nums)
    nums = list([x//2 for x in list([x for x in nums if x%2 == 0])])
    count += (size - len(nums))*iters
    iters += 1
    
print(count)
# Original solution
N = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
for i in range(N):
    while a[i] % 2 == 0:
        a[i] /= 2
        ans += 1
print(ans)

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
for i in range(N):
    while a[i] % 2 == 0:
        a[i] //= 2
        ans += 1
print(ans)
# Original solution
#!/usr/bin/env python3
import sys
INF = float("inf")

import math
import collections


def trial_division_sqrt(n):
    prime_count = collections.Counter()

    for i in range(2, int(math.sqrt(n)) + 2):
        while n % i == 0:
            n /= i
            prime_count[i] += 1
    if n > 1:
        prime_count[int(n)] += 1

    return prime_count


def solve(N: int, a: "List[int]"):
    print((sum([trial_division_sqrt(v)[2] for v in a])))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, a)


if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/env python3
import sys
INF = float("inf")

import math
import collections


def solve(N: int, a: "List[int]"):
    print((int(sum([math.log2(v & -v) for v in a]))))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, a)


if __name__ == '__main__':
    main()
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
ans=0
flug=1

while 1:
    flug=0
    for i in range(n):
        if a[i]%2==0 and flug==0:
            a[i]=a[i]//2
            flug=1
        else:
            a[i]=a[i]*3
    else:
        if flug==1:
            ans+=1
        else:
            print(ans)
            exit()

# Optimized solution
n=int(eval(input()))
a=list(map(int,input().split()))
ans=0

for i in range(n):
    while a[i]%2==0:
        a[i]=a[i]//2
        ans+=1

print(ans)
# Original solution
n, *a = list(map(int, open(0).read().split()))

count = 0
for i in a:
    if i % 2 == 0:
        while i % 2 == 0:
            if i % 2 == 0:
                count += 1
                i //= 2
            else:
                break

print(count)

# Optimized solution
n, *a = list(map(int, open(0).read().split()))
count = 0
for i in a:
        while i % 2 == 0:
            count += 1
            i //= 2
print(count)
# Original solution
n = int(eval(input()))
A = list(map(int, input().split()))
A.sort(reverse=True)
ans = 0

while any(A[i] % 2 == 0 for i in range(n)):
    count = 0
    for i in range(n):
        if A[i] % 2 == 0:
            if count == 0:
                A[i] = A[i] // 2
                count += 1
            else:
                A[i] = A[i] * 3
        else:
            A[i] = A[i] * 3
    A.sort(reverse=True)
    ans += 1
        
print(ans)

# Optimized solution
n = int(eval(input()))
A = list(map(int, input().split()))
A2 = []

for i in range(n):
    if A[i] % 2 == 0:
        A2.append(A[i])
        
count = 0
for a in A2:
    while a % 2 == 0:
        a = a // 2
        count += 1
        
print(count)
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
ans = 0
for a in A:
    cnt = 0
    for i in range(1,a + 1):
        if a % 2**i == 0:
            cnt += 1
    else:
        ans += cnt
print(ans)

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
ans = 0
for a in A:
    cnt = 0
    for i in range(1,a + 1):
        if a % 2**i == 0:
            cnt += 1
        else:
            break
    ans += cnt
print(ans)
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
ans = 0
for a in A:
    cnt = 0
    for i in range(1,a + 1):
        if a % 2**i == 0:
            cnt += 1
        else:
            break
    ans += cnt
print(ans)

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
ans = 0
for a in A:
    while a % 2 == 0:
        a //= 2
        ans += 1
print(ans)