Problem:
 Score: 300 points    Problem Statement  As AtCoder Beginner Contest 100 is taking place, the office of AtCoder, Inc. is decorated with a sequence of length N , a = { a_1, a_2, a_3, ..., a_N }. Snuke, an employee, would like to play with this sequence.  Specifically, he would like to repeat the following operation as many times as possible:  For every i satisfying 1 \leq i \leq N , perform one of the following: "divide a_i by 2 " and "multiply a_i by 3 ".  
Here, choosing "multiply a_i by 3 " for every i is not allowed, and the value of a_i after the operation must be an integer.  At most how many operations can be performed?      Constraints   N is an integer between 1 and 10 \ 000 (inclusive).  a_i is an integer between 1 and 1 \ 000 \ 000 \ 000 (inclusive).         Input  Input is given from Standard Input in the following format:  N  a_1  a_2  a_3  ...  a_N       Output  Print the maximum number of operations that Snuke can perform.        Sample Input 1 3
5 2 4      Sample Output 1 3  The sequence is initially {5, 2, 4} . Three operations can be performed as follows:   First, multiply a_1 by 3 , multiply a_2 by 3 and divide a_3 by 2 . The sequence is now {15, 6, 2} .  Next, multiply a_1 by 3 , divide a_2 by 2 and multiply a_3 by 3 . The sequence is now {45, 3, 6} .  Finally, multiply a_1 by 3 , multiply a_2 by 3 and divide a_3 by 2 . The sequence is now {135, 9, 3} .        Sample Input 2 4
631 577 243 199      Sample Output 2 0  No operation can be performed since all the elements are odd. Thus, the answer is 0 .       Sample Input 3 10
2184 2126 1721 1800 1024 2528 3360 1945 1280 1776      Sample Output 3 39

Solution (Python):

def main():
    n = int(input())
    a = list(map(int,input().split()))

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

    print(ans)


if __name__ == "__main__":
        main()

Solution (Python):
N = int(input())
a_list = list(map(int, input().split()))

count = 0
for a in a_list:
    while True:
        if a%2 == 0:
            a = a/2
            count += 1
        else:
            break
print(count)

Solution (Python):
N = int(input())
k = 0
for a in map(int, input().split()):
  while a % 2 == 0:
    k += 1
    a //= 2
print(k)

Solution (Python):


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

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

Solution (Python):
import numpy
N = int(input())
a = [int(i) for i in input().split()]
b = 0
i = 0
while i < N:
    if a[i] % 2 == 0:
        b = b + 1
        a[i] = a[i] / 2
    else:
        i = i+1

print(b)

Solution (Python):
n = int(input())
l = [int(_) for _ in input().split()]

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

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
    x = a[i]
    while(True):
        if x % 2 == 0:
            x /= 2
            ans += 1
        else:
            break
print(ans)

Solution (Python):

n = int(input())
a = list(map(int, input().split()))
c = 0
for num in a:
    p = num
    for i in range(30):
        if p % 2 == 0:
            c += 1
            p //= 2
        else:
            break
print(c)

Solution (Python):
n=int(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)

Solution (Python):

a=int(input())
c=0
def div2(a):
    global c
    c+=bin(a)[::-1].index("1")
for x in input().split():
    div2(int(x))
print(c)

Solution (Python):
n = int(input())
nums = map(int,input().split())

count = 0
for i in nums:
  if i % 2 ==0:
    while i % 2 ==0:
      i /= 2
      count += 1

print(count)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

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

ans = 0
for i in range(n):
    ans = ans + m[i]

print(ans)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
s = 0

for i in range(N):
	x = 0
	while True:
		if a[i] % 2 == 0:
			x += 1
			a[i] = int(a[i] // 2)
		else:
			break
	s += x

print(s)

Solution (Python):
N = input()
alist = [int(i) for i in input().split()]
d = 0
for i in alist:
  while i % 2 == 0:
    i = i / 2
    d += 1
print(d)

Solution (Python):
n = int(input())
alist = [int(x) for x in input().split()]
twolist = [536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2]

count = 0
for x in alist:
  for i,num in enumerate(twolist):
    if x % num == 0:
      count += (29-i)
      break
print(count)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    for j in range(1,30):
        if i % (2 ** j) == 0:
            ans += 1
            pass
        else:
            break
print(ans)

Solution (Python):
def cul(x,y):
    if x%2 == 0:
        return cul(int(x/2),y+1)
    else:
        return y

N = int(input())
A = list(map(int,input().split(" ")))
count = 0
for i in range(len(A)):
    count += cul(A[i],0)
print(count)

Solution (Python):
Num_of_pr = int(input())
a_i = [int(i) for i in input().split()]
counter = 0
for i in range(Num_of_pr):
    while a_i[i]%2 == 0:
        counter += 1
        a_i[i] /= 2
print(counter)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

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

Solution (Python):



def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = 0

    for ai in a:
        while ai % 2 == 0:
            ans += 1
            ai = ai // 2

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N=int(raw_input())
a=map(int,raw_input().split())
s=0
for i in a:
  for j in range(100):
    if i%(2**(j+1))!=0:
      s+=j
      break
print s

Solution (Python):
num = int(input())
lis = list(map(int,input().split()))

ans = 0
for i in range(num):
    while lis[i]%2 == 0:
        lis[i] = lis[i]/2
        ans += 1
print(ans)

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
count = 0
for i in a:
  while True:
    i /= 2
    if int(i) == i:
      count += 1
    else:
      break
print(count)

Solution (Python):
N = int(input())
a = map(int,input().split())
k = 0
for i in a:
    while i%2 == 0:
        k+=1
        i/=2
print(k)

Solution (Python):
N=int(input())
s=0
a=[int(i) for i in input().split()]
for i in range(1,31):
    t=0
    for j in a:
        if j%(2**i)==0:
            s+=1
            t+=1
        else:
            continue
    if t==0:
        break
print(s)

Solution (Python):
input();print(sum(bin(i)[::-1].index('1') for i in map(int,input().split())))

Solution (Python):
input();print(sum([bin(i)[::-1].index('1')for i in map(int,input().split())]))

Solution (Python):
input();print(sum([bin(i)[::-1].index('1')for i in map(int,input().split())]))

Solution (Python):
input();print(sum([bin(i)[::-1].index('1') for i in map(int,input().split())]))

Solution (Python):
n = int(input())
list_a = list((map(int, input().split())))

factor2 = 0
for number in list_a:
    while number % 2 == 0:
        number /= 2
        factor2 += 1

print(factor2)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
c = 0
for x in a:
  y = x
  while y%2 == 0:
    y //= 2
    c += 1
print(c)

Solution (Python):
def count_div(num, mod):
    cnt = 0
    r = 0
    while r == 0:
        q, r = divmod(num, mod)
        if r == 0:
            num = q
            cnt += 1

    return cnt

n = int(input())
a = [int(v) for v in input().split()]

ans = 0
for v in a:
    ans += count_div(v, 2)
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
c=0
for i in a:
  while i%2==0:
    i=i/2
    c+=1
print(c)

Solution (Python):
n = int(input())
listA = list(map(int, input().split()))
count =0
index=0
while index < len(listA):
    while True:
        if listA[index]%2==1:
            break
        else:
            listA[index]/=2
            count+=1
    index+=1

print(count)

Solution (Python):
N = int(input())
A = [int(x) for x in input().split()]

def main():
    ans = 0
    for i in range(N):
        n = A[i]
        while True:
            quotient, reminder = divmod(n, 2)
            if reminder != 0:
                break
            n = quotient
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
input();print(sum(bin(int(x))[::-1].index('1')for x in input().split()))

Solution (Python):
input();print(sum(bin(int(x))[::-1].index('1')for x in input().split()))

Solution (Python):
input()
print(sum([bin(i)[::-1].index("1")for i in map(int,input().split())]))

Solution (Python):
input();print(sum([bin(i)[::-1].index("1") for i in map(int,input().split())]))

Solution (Python):
N = int(input())
S = list(map(int, input().split()))
count = [0] * N
for i in range(N):
    while S[i] % 2 == 0:
        S[i] = S[i] / 2
        count[i] += 1
print(sum(count))

Solution (Python):
n = int(input())

a = []
for part in input().split():
    a.append(int(part))

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

print(cnt)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
k = 0
for i in range(N):
  while (A[i] % 2 == 0):
    A[i] = A[i]//2
    k += 1
  else:
    i += 1
print(k)

Solution (Python):

"""
C - *3 or /2
https://abc100.contest.atcoder.jp/tasks/abc100_c

"""
import sys
from sys import stdin
input = stdin.readline


def solve(data):
    ans = 0
    for d in data:
        while d % 2 == 0:
            ans += 1
            d //= 2
    return ans


def main(args):
    N = int(input())
    data = [int(i) for i in input().split()]
    ans = solve(data)
    print(ans)

if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

def f(x):
    count = 0
    while x % 2 == 0:
        x //= 2
        count += 1

    return count

print(sum(map(f, a)))

Solution (Python):
n=int(input())

a=list(map(int,input().split()))
b=[]
sum=0

for i in range(n):
  cnt=1
  while (a[i])%(2**cnt)==0:
    cnt+=1
  b.append(cnt-1)

for i in range(n):
  sum=sum+b[i]
  
print(sum)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
xs = list(filter(lambda i:i%2 == 0,a))
ans = 0
for x in xs:
    while x%2 == 0:
        x /= 2
        ans += 1
print(ans)

Solution (Python):
input()

arr = [int(i) for i in input().split(' ')]

even_sum = 0

for x in arr:
    while x % 2 == 0:
        x /= 2
        even_sum += 1

print(even_sum)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
count=0
i=0
while 1:
    if i>n-1:
        print(count)
        break
    b=a[i]%2
    if b!=0:
        i+=1
    elif b==0:
        a[i]/=2
        count+=1

Solution (Python):
N = int(input())
print(sum([bin(ai)[:1:-1].find('1') for ai in map(int, input().split())]))

Solution (Python):
N=int(input())
a=list(map(int, input().split()))
count = 0

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

print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ret = 0
for a in A:
    while a % 2 == 0:
        ret += 1
        a //= 2

print(ret)

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = inp()
aa = inpl()
ans = 0
for a in aa:
	while a%2 == 0:
		a //= 2
		ans += 1

print(ans)

Solution (Python):



def inpl(): return list(map(int, input().split()))


n = int(input())
A = inpl()

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

print(ans)

Solution (Python):
input()
a = list(map(int, input().split()))
ans = 0
for i in a:
    if i%2 != 0:
        continue
    while i%2 == 0:
        ans += 1
        i //= 2
print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    while i % 2 == 0:
        ans += 1
        i /= 2
print(ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
SUM = 0
for i in A:
    while i%2 == 0:
        i//=2
        SUM += 1
print(SUM)

Solution (Python):
N = int(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)

Solution (Python):
N = int(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)

Solution (Python):
N = int(input())

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

count_A =[]
for i in range(N):
    count = 0
    while A[i]%2 == 0:
        A[i] = A[i]/2
        count += 1
    count_A.append(count)
print(sum(count_A))

Solution (Python):
N = int(raw_input())
a = map(int,raw_input().split())
c = 0
for i in range(N):
  b = a[i]
  while b%2 == 0:
    b /= 2
    c += 1
print c

Solution (Python):
def count2(n):
	cnt = 0
	now = n
	while now % 2L == 0:
		cnt = cnt + 1L
		now = now / 2L
	return cnt

N = long(raw_input())
A = map(long, raw_input().split())
sum = 0L
for i in range(0, N):
	sum = sum + count2(A[i])
print sum

Solution (Python):
n = int(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)

Solution (Python):


n = int(input())
A = list(map(int, input().split()))

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

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
res = 0
for i in a:
    while i%2==0:
        res += 1
        i //= 2
print(res)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
for nums in A:
  while nums%2==0:
    nums = nums//2
    ans += 1
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

r = 0

for a in A:
    while a % 2 == 0:
        if a % 2 == 0:
            r += 1
            a /= 2

print(r)

Solution (Python):
n = input()
a = map(int,input().split())
c = 0
for i in a:
    while i % 2 == 0:
        c += 1
        i /= 2
print(c)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(len(a)):
    while(a[i] % 2 == 0):
        cnt += 1
        a[i] //= 2
print(cnt)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

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

Solution (Python):
N = int(input())
A = map(int,input().split())

ans = 0
for a in A:
  while a%2 == 0:
    ans += 1
    a //= 2

print(ans)

Solution (Python):
N = int(input())
a = list(map(int,input().split()))

cnt = 0
for i in range(N):
    while True:
        if a[i] % 2 != 0:
            break
        else:
            cnt+=1
            a[i] = a[i] / 2
print(cnt)

Solution (Python):

        
def getEven(N):
    cnt = 0
    while N % 2 == 0:
        cnt += 1
        N /= 2
    return cnt

def solve(Ai, N):
    ans = 0
    for a in Ai:
        ans += getEven(a)
    return ans

if __name__ == "__main__":

    N = int(input())
    Ai = map(int, input().split())
    print(solve(Ai, N))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
  while i % 2 == 0:
    i /= 2
    ans += 1
print(ans)

Solution (Python):
answer = 0
N = int(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)

Solution (Python):
N=int(input())
a=map(int, input().split())


def factorize(c):
 s=0
 while c%2==0:
  s=s+1
  c=c/2 
 return s

print(sum(map(factorize, a)))

Solution (Python):
print(0*int(input())+sum(list(map(lambda x:sum([0 if int(x)%(2**i) else 1 for i in range(1,30)]),input().split()))))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

def times(N):
    t = 0
    while (N%2==0 and N//2>0):
        N = N//2
        t += 1
    return t

T=0
for i in range(n):
    T += times(a[i])

print(T)

Solution (Python):

n = int(input())

def div2(x):
    ret = 0
    while x%2==0:
        x /= 2
        ret += 1
    return ret

ret = 0
for a in input().split(" "):
    a = int(a)
    ret += div2(a)

print(ret)

Solution (Python):
N = int(input())
Seq = list(map(int, input().split()))
def order_2(n): 
    ans = 0
    while n % 2 == 0:
        ans += 1
        n //= 2
    return ans
print(sum([order_2(a) for a in Seq]))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

answer = 0 
while len(A):
    A = list(filter(lambda x: x % 2==0, A)) 
    answer += len(A)
    A = [int(a/2) for a in A]

print(answer)

Solution (Python):
n=int(input())
A=list(map(int,input().split()))

co=0

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

print(co)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for _a in a:
  while _a % 2 == 0:
    _a /= 2
    ans += 1
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))


def two(n):
  result = 0
  while n % 2 == 0:
    result += 1
    n = n // 2
  return result

print(sum(map(two, A)))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 0
for a in A:
    ans += bin(a)[::-1].index("1")
        
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

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

Solution (Python):
N = int(input())
src = list(map(int,input().split()))
ans = 0
for a in src:
    while a%2 == 0:
        a //= 2
        ans += 1
print(ans)

Solution (Python):
import math
N = int(input())
A = list(map(int, input().split(" ")))

cnt = 0
for i in range(N):
    while A[i] >= 2 and A[i] % 2 == 0:
        cnt += 1
        A[i] //= 2
print(cnt)

Solution (Python):
import numpy as np
from copy import copy

N = int(input())
A = list(map(int, input().split()))




def divider(n, p):
    
    k = 0
    while n % p == 0:
        n = n / p
        k += 1
    return k

ks = []

for a in A:
    k = divider(a, 2)
    ks.append(k)

print(sum(ks))

Solution (Python):
n = int(input())

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

ans = 0

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

print(ans)

Solution (Python):
N = int(raw_input())
a = [int(x) for x in raw_input().split()]

count = 0

for i in a:
  while i%2 == 0:
    count = count + 1
    i = i / 2
print count

Solution (Python):


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

count=0

for a in A:
    while (a%2) != 1:
        count+=1
        a = a/2

print(count)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
count = 0;
for ai in a:
    while ai % 2 == 0:
          ai //= 2
          count += 1
print(count)

Solution (Python):
def dl2(n):
    if n % 2 == 1:
        return 0
    else:
        return 1 + dl2(n/2)

def main():
    N = input().split(" ")
    t = input().split(" ")
    ans = 0
    for i in t:
        ans += dl2(int(i))
    print(ans)

main()

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
ans = 0
for ai in a:
    cou = 0
    while ai % 2 == 0:
        ai //= 2
        cou += 1
    ans += cou
print(ans)

Solution (Python):
def getinputdata():

    array_result = []    
    array_result.append(input().split(" "))

    flg = True

    try:
        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

n= int(arr_data[0][0])

arr=[int(arr_data[1][x]) for x in range(n)]
arr01 = [x for x in arr if x % 4 ==0] 
arr02 = [x for x in arr if x % 4 !=0 and x % 2==0] 

cnt=0
if len(arr)>0:

    for i in arr01:

        while i % 2==0:

            i//=2
        
            cnt+=1
    
    cnt+=len(arr02)
   
print(cnt)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

SUM = 0
for i in range(N):
  while a[i] >= 2 and a[i] % 2 == 0:
    SUM += 1
    a[i] //= 2
    
print(SUM)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))

cnt = 0
for i in range(N) :
    while a[i] >= 2 and a[i] % 2 == 0 :
        cnt += 1
        a[i] //= 2
        
print(cnt)

Solution (Python):
n=int(input())
v=map(int,input().split())
v=sorted(v)[::-1]
c=0
cnt=0
while 1:
    while 1:
        if v[c]%2:break
        cnt+=1
        v[c]/=2
    c+=1 
    if c>=n:break
print(cnt)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))


A = [bin(a)[2:] for a in A]
ans = sum([len(a) - (a.rfind("1") + 1) for a in A])

print(ans)

Solution (Python):
def div2count(x):
    count = 0
    while x%2 == 0:
        count+= 1
        x = x / 2
    return count

def C(a):
    return sum(list(map(div2count,a)))

n = input()
a = map(int,input().split())
print(C(a))

Solution (Python):
''' *3 or /2  '''
total = 0

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

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


def forl(num):
    count = 0

    if num%2==1:
        return 0

    while num%2 is 0 and num>1:
        count+=1
        num//=2
    
    return count

'''total+=forl(2)
total+=forl(4)'''

for i in ar:
    total+=forl(i)

print(total)

Solution (Python):
''' *3 or /2  '''
total = 0

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

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


def forl(num):
    count = 0

    if num%2==1:
        return 0

    while num%2 is 0 and num>1:
        count+=1
        num//=2
    
    return count

'''total+=forl(2)
total+=forl(4)'''

for i in ar:
    total+=forl(i)

print(total)

Solution (Python):
N = int(input())

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

li_even = []

for i in a:
    if i % 2 == 0:
        li_even.append(i)
    else:
        pass
count = 0
for num in li_even:
    while num % 2 == 0:
        num /= 2
        count += 1

print(count)

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
ans = 0

for i in L:
    while i % 2 == 0:
        i /= 2
        ans += 1
print(ans)

Solution (Python):
import numpy as np


n = int(input())


list_a = [int(a) for a in input().split() if not int(a)%2 ]

numOps = 0


for el in list_a:
    
    while(el%2 == 0):
        el = el / 2
        numOps += 1

print(numOps)

Solution (Python):
def count_two(n):
	two = 0
	while n%2 == 0:
		n //= 2
		two += 1
	return two

n = int(input())
a = [int(m) for m in input().split(" ")]

print(sum([count_two(a_n) for a_n in a]))

Solution (Python):
import sys 
import math

N = int(input())
a = []
a = list(map(int, input().split(" ")))
total = 0;

for i in range(len(a)):
    while(a[i]%2 ==0):
        total += 1
        a[i] /= 2
print(total)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
count = 0
for i in range(n):
  while l[i] % 2 == 0:
    count += 1
    l[i] = l[i]/2

print(count)

Solution (Python):
N = int(input())
ai = list(map(int, input().split()))

tot = 0
for i in ai:
    cnt = 0
    while (i %2 == 0):
        cnt += 1
        i = i//2
    tot += cnt

print(tot)

Solution (Python):
n=int(input())
a=0
for i in list(map(int,input().split())):
    while i%2<1:
        i/=2;a+=1
print(a)

Solution (Python):
N=int(input())
an=map(int,input().split())
cnt = 0
for n in an:
  while True:
    if (n&0b1)==0:
      cnt = cnt+1
      n = n//2
    else:
      break
print(cnt)

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()]
count = 0
for i in range(N):
    while a[i] % 2 == 0:
        while a[i] % 65536 == 0:
            count += 16
            a[i] /= 65536
        else:
            if a[i] % 256 == 0:
                count += 8
                a[i] /= 256
            elif a[i] % 16 == 0:
                count += 4
                a[i] /= 16
            elif a[i] % 4 == 0:
                count += 2
                a[i] /= 4
            elif a[i] % 2 == 0:
                count += 1
                a[i] /= 2
print(count)

Solution (Python):
N = int(input())
a = list(map(int,input().rstrip().split()))
sum = 0
for i in a:
    if i%2 !=0:
        pass
    else:
        while i%2==0:
            i /=2
            sum +=1
print(sum)

Solution (Python):
N=int(input())
a=map(int,input().split())
count=0
for num in a:
	while num%2==0:
		num//=2
		count+=1

print(count)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
k = 0
while k < N:
  if A[k] % 2 == 0:
    ans += 1
    A[k] = A[k]//2
  else:
    k += 1
print(ans)

Solution (Python):


def main():
    
    N = int(input())
    a = list(map(int, input().split()))

    
    count = 0

    for i in a:
        while i % 2 == 0:
            i /= 2
            count += 1 
            
    print(count)
 
if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())

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

count=0
for i in range(N):
    while A[i]%2==0:
        A[i]=A[i]//2
        count+=1
print(count)

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)


def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))


def to_bin(x):
    return bin(x)[2:]



dp = None

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    ans = 0

    for a in A:
        while a % 2 == 0:
            a //= 2
            ans += 1

    print(ans)

main()

Solution (Python):
N = int(input())
A = [int(i) for i in list(input().split())]

cnt_sum = 0
for i in range(N):
    tmp = A[i]
    cnt = 0
    while True:
        if tmp % (2**(cnt + 1)) == 0:
            cnt += 1
            pass
        else:
            break
    cnt_sum += cnt
print(cnt_sum)

Solution (Python):
_ = input()
a = [int(i) for i in input().split()]
cnts = []
for i in a:
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    cnts.append(cnt)
print(sum(cnts))

Solution (Python):


N = int(input())
aN = list(map(int, input().split()))

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

Solution (Python):

N = int(input())
l = list(map(int,input().split()))
k = 0
for i in range(N):
	while l[i] % 2 == 0:
		l[i] = l[i] /2
		k = k + 1
print(k)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
ans = 0
while True:
	odd = 0 
	for i in range(len(a)):
		if a[i] % 2 == 0:
			a[i] /= 2
			ans += 1
		else:
			odd += 1
	if odd == len(a):
		break
print(ans)

Solution (Python):
input()
an = list(map(int, input().split()))
count = 0
for a in an:
    while a % 2 == 0:
        a /= 2
        count += 1
print(count)

Solution (Python):


n = int(input())
a = [int(i) for i in input().split()]
total = 0

while(any(i % 2 == 0 for i in a)):
    total += sum(i % 2 == 0 for i in a)
    a = [i // 2 for i in a if i % 2 == 0]

print(total)

Solution (Python):
N = int(raw_input())
a = [int(t) for t in raw_input().split()]

def how_manys_2(a):
  count = 0
  while a % 2 == 0:
    a = a // 2
    count += 1
  return count

b = [how_manys_2(t) for t in a]
print(sum(b))

Solution (Python):
N = int(input())
num = list(input().split(" "))
j = 0
for i in range(len(num)):
  s = int(num[i])
  while True:
    if s/2 == int(s/2):
      s = s/2
      j += 1
    else:
      break
print(j)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
ans = 0
while True:
	odd = 0 
	for i in range(len(a)):
		if a[i] % 2 != 0:
			odd += 1
		else:
			a[i] /= 2
			ans += 1
	if odd == len(a):
		break
print(ans)

Solution (Python):
from functools import reduce

def count_two(n):
	two_count = 0
	while n != 0 and n % 2 == 0:
		two_count += 1
		n //= 2
	return two_count

n = int(input())
a = map(int, input().split())
a_two_count_sum = sum([count_two(ai) for ai in a])
print(a_two_count_sum)

Solution (Python):
N = int(input())
a_li = list(map(int,input().split()))
         
cnt = 0
for i in a_li:
    while i % 2 == 0:
        cnt += 1
        i //= 2
        if i % 2 != 0:
            break
        
print(cnt)

Solution (Python):
N = int(input())
a_li = list(map(int,input().split()))

cnt = 0
for i in a_li:
    while i % 2 == 0:
        cnt += 1
        i //= 2
        if i % 2 != 0:
            break

print(cnt)

Solution (Python):
N = int(input())
sl = list(map(int, input().split()))
ans = 0
for s in sl:
    while s % 2 == 0:
        ans += 1
        s /= 2
print(ans)

Solution (Python):


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

ans = 0
for num in li:
	while True:
		if num % 2 == 0:
			ans += 1
			num /= 2
		else:
			break

print(ans)

Solution (Python):
def div2time(n):
    if n % 2 == 1:
        return 0
    return 1 + div2time(n // 2)

if __name__ == "__main__":
    n = int(input())
    array = [int(s) for s in input().split()]
    print(sum(div2time(n) for n in array))

Solution (Python):
N=int(input())
a=list(map(int,input().split()))

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

Solution (Python):
input(); print(sum(list(map(lambda *x:(lambda f:f(f, *x))(lambda f,a: f(f, a//2)+1 if a % 2 == 0 else 0), 
list(map(int, input().split()))))))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

k = [0] * n
while 1:
    f = 0
    for i in range(n):
        if a[i] % 2 == 0:
            f = 1
            a[i] //= 2
            k[i] += 1
    if not f:
        break
print(sum(k))

Solution (Python):
n =int(input())
a = [int(i) for i in input().split()]
count = 0
for num in a:
    while(num % 2 == 0):
        num /= 2
        count += 1

print(count)

Solution (Python):
N=int(input())
A=list(map(int, input().split()))
def two_devide(n):
    ans=0
    while True:
        if n%2: return ans
        else:
            n/=2
            ans+=1
sans=0
for a in A:
    sans+=two_devide(a)
print(sans)