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():
    """
    1 <= N <= 10^4
    1 <= ai <= 10^9
    """
    N = int(input())
    A = map(int, input().split())

    ans = f(N, A)
    print(ans)


def f(N, A):
    """
    以下の操作をできるだけ多くの回数繰り返す

    1 ≤ i ≤ N を満たす全ての i に対して,
    どちらかを行う.  
        ai の値を 2で割る
        aiの値を 3倍する
    ただし,
        全ての i に対して 3倍することはできず
        操作後の aiの値は整数でなければならない


    2の倍数でなければ2で割れない
    2で割って奇数になった場合、その後は3倍にしかできない
    操作後の数値上限はないので、1つでも2で割れれば良い
    """
    ans = sum(p(a) for a in A)

    return ans


def p(a):
    ans = 0
    while a > 0:
        if a % 2 == 0:
            ans += 1
            a //= 2
        else:
            break
    return ans


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
a=map(int,input().split())
a=list(a) 
import numpy as np
count_list=[0]*N
def gcd(a,b):
    c=np.floor(a/b)
    return a-b*c
for i in range(len(a)):
    while gcd(a[i],2)==0:
        count_list[i]+=1
        a[i]=a[i]/2

print(sum(count_list))

Solution (Python):


def check(a):
    result = 0
    for o in a:
        while True:
            if o % 2 == 0:
                o = o / 2
                result += 1
            else:
                break
    
    return result


if __name__ == "__main__":
    n = int(input())
    tmp = input().split(" ")
    a = []
    for i in range(n):
        a.append(int(tmp[i]))
    
    print(check(a))

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

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

Solution (Python):


def evennum(number):
    count=0
    while(1):
        if number%2==1:
            break
        else:
            number=number/2
            count+=1
    return count

n=int(input())

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

count=0

for i in range(n):
    count+=evennum(l[i])

print(count)

Solution (Python):



def even_count(v):
    if v % 2 != 0:
        return 0
    else:
        r = 0
        while v % (2 ** 20) == 0:
            r += 20
            v //= (2 ** 20)

        while v % (2 ** 10) == 0:
            r += 10
            v //= (2 ** 10)

        while v % 2 == 0:
            r += 1
            v //= 2

    return r


N = int(input())

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

count = 0

for i in a:
    count += even_count(i)

print(count)

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

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

Solution (Python):
def soinsuubunkai(listdata):
    cnt = 0
    for i in listdata:
        while True:
            if i % 2 == 0:
                cnt += 1
                i /= 2
            else:
                break
    return cnt

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

print(soinsuubunkai(a))

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

int_a = []
for i in range(N):
    int_a.append(int(a[i]))

cnt = 0
for i in range(N):
    if (int_a[i] % 2) == 0:
        t = int_a[i]
        while t > 1:
            if (t % 2) == 0:
                cnt += 1
            t /= 2

print(cnt)

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

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

count = 0
for ai in a:
    if ai % 2 == 0:
        while ai % 2 != 1:
            ai = ai // 2
            count += 1

print(count)

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

answer = 0
for a_i in a:
    while a_i % 2 == 0:
        answer += 1
        a_i = a_i / 2

print(answer)

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

Solution (Python):
import math
N=int(input().strip())
A=list(map(int,input().split()))
nns=[2**i for i in range(31)]
def func(n,x):
    return n%nns[x]==0
def binsearch_int(func, min_x, max_x):
    """func(x) == Trueとなる最大のxを返す
    """
    if func(max_x):
        return max_x
    if not func(min_x):
        return None
    left,right=min_x,max_x
    while left+1<right:
        mid=(left+right)//2
        if func(mid):
            left=mid
        else:
            right=mid
    return left
print(sum(binsearch_int(lambda x: func(i,x),0,int(math.log2(i))+1) for i in A))

Solution (Python):
N = int(input())
a = input().split(" ")
cou = 0

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

print(cou)

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:
            count+=1
            a[i]/=2
print(count)

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

z = 0
for i in range(0, N):
	a = int(A[i])
	while True:
		m = a % 2
		if m > 0:
			break
		else:
			z += 1
		a /= 2

print(z)

Solution (Python):
N = int(input())
lst = list(map(int, input().split()))
cnt = 0

for i in lst:
    n = i
    
    while n % 2 == 0:
        n /= 2
        cnt += 1

print(cnt)

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

count = 0

for i in A:
    while(True):
        if i%2 == 1:
            break

        i = i/2
        count += 1

print(count)

Solution (Python):
if __name__ == "__main__":
    _ = input()
    nums = map(int, input().split(" "))
    count = 0
    for n in nums:
        while n%2 == 0:
            n /= 2
            count += 1
 
    print(count)

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


def num_two_div(a):
    n = a
    for i in range(a):
        if n % 2 == 0:
            n //= 2
        else:
            return i
    raise Exception

count = 0
for a in A:
    
    count += num_two_div(a)

print(count)

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

ans = 0
for i in a:
    j = int(i)
    while j % 2 == 0:
        j = j//2
        ans = ans + 1

print(ans)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]


def devide(k, l=0):
    if k % 2 == 1:
        return l
    return devide(k/2, l+1)

sum = 0

for i in range(n):
    sum += devide(a[i])

print(sum)

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

if __name__ == '__main__':
    hoge = input()
    max_count = 0
    for x in input().split():
        x = int(x)
        if x % 2 != 0:
            continue
        max_count += foo(x)
    print(max_count)

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

Solution (Python):
import numpy as np
N = int(input())
a = list(map(int,input().split()))
ans = 0
a = np.array(a)
while a.size > 0:
    a = a[a%2 == 0]
    ans += len(a)
    a = a//2
print(ans)

Solution (Python):
n = input()
a = map(int, raw_input().split())
ans = 0
donotbreak = True
for i in range(n):
	if a[i] % 2 == 0:
		donotbreak = False
		break
if donotbreak:
	print ans
	exit()
for i in range(n):
	while a[i] %2 == 0:
		ans += 1
		a[i] /= 2
print ans

Solution (Python):

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

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

print(output)

Solution (Python):
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    a = [int(x) for x in stdin.readline().rstrip().split()]
    count = 0
    for x in a:
        while x % 2 == 0:
            count += 1
            x = x // 2
    print(count)


if __name__ == '__main__':
    main()

Solution (Python):
from collections import deque
import sys
import math

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    s = 0
    for i in range(N):
        a = (int(input_raw[i]))
        while 1:
            if a % 2 == 0:
                s += 1
                a /= 2
            else:
                break
    print s



if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a_l = list(map(int,input().split()))
co = 0

for i in range(n):
    while(True):

        if a_l[i]%2 == 0:
            co = co + 1
            a_l[i] = a_l[i]/2
        else:
            break

print(co)

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

for j in range(0,N):
    while a[j]%2 == 0:
        a[j] = a[j] / 2
        co = co + 1

print(co)

Solution (Python):
n = int(input())
f = lambda x: 0 if x % 2 > 0 else 1 + f(x // 2)
print(sum(f(int(x)) for x in input().split()))

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
def foo(x):
    ans = 0
    while x%2 == 0:
        x = x//2
        ans += 1
    return ans
print(sum(foo(ai) for ai in a))

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

inp = input().split()

for i in range(N):
    inp[i] = int(inp[i])

count = 0

for i in inp:
    tmp = i
    while(tmp%2 == 0):
        tmp = tmp//2
        count += 1

print(count)

Solution (Python):


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

t = 0
for i in a:
    m = i
    while m % 2 == 0:
        t += 1
        m /= 2

print(t)

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

aa = [str(bin(aa))[::-1].find('1') for aa in A]

print(sum(aa))

Solution (Python):
N = int(input())
a = [int(w) for w in input().split()]
if len(a) != N: raise

def factorizeByTwo(n):
    e = 0
    while n > 0 and n % 2 == 0:
        n //= 2
        e += 1
    return e

print(sum(map(factorizeByTwo, a)))

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

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

print(k)

Solution (Python):

"""
Created on Sat Jun 16 20:49:48 2018
ABC100C
@author: maezawa
"""

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

cnt = 0
for x in a:
    while True:
        if x % 2 == 0:
            cnt += 1
            x = x/2
        else:
            break

print(cnt)

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

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

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

Solution (Python):
def m():
    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
    return ans

print(m())

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):
n = int(input())
a = list(map(int, input().split()))
b = []
cnt = 0

for x in a:
    if x % 2 == 0:
        b.append(x)

for j in range(len(b)):
    while(b[j] % 2 == 0):
        cnt += 1
        b[j] /= 2

print(cnt)

Solution (Python):
def cout(num, d):
    if num%2==0:
        return d+1
    else:
        return d
count=0

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

for i in A:

    j = i
    while j%2==0:
        count = cout(j,count)
        j=j/2

print(count)

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

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

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

Solution (Python):
N=int(input())
list=input().rstrip().split() 
a=[ int(list[j]) for j in range(len(list))]
counter=0
for j in range(N):
    while( a[j]%2==0):
        counter+=1
        a[j]=a[j]//2
print(counter)

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

odd_num = 0
for A_i in A:
    tmp_odd_num = 0
    while A_i % 2 == 0:
        A_i //= 2
        tmp_odd_num += 1
    odd_num += tmp_odd_num

print(odd_num)

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

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

Solution (Python):




if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))
    count = 0

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

    print(count)

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

print(maxi)

Solution (Python):
n = int(input())
l = [int(x) for x in input().split()]
s = 0
for i in range(n):
  while l[i]%2==0:
    l[i] = l[i]//2
    s += 1
print(s)

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

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

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

ans=0
for i in a:
	b = True
	while b:
		if (i//2)==(i/2):
			ans+=1
			i = i//2
		else:
			b=False
			
print(ans)

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

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())
b = list(map(int,input().split()))
cnt = 0

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

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

count = 0

for i in range(N):
    tmp = Base_10_to_n(a[i], 2)[::-1]
    for j in range(len(tmp)):
        if tmp[j] == '0':
            count += 1
        else:
            break

print(count)

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

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

print(int(count))

Solution (Python):




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())
num = input().split()

k = 0

for i in num:
  n = int(i)
  while(True):
    if n % 2 == 0:
      n /= 2
      k += 1
    else:
      break
      
print(k)

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    a = map(int, input().split())

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

    print(count)

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

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

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

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]

def b(c):
    i = 0
    while c%2 == 0:
        c = c//2
        i += 1
    return i

ans = 0
for i in a:
    ans += b(i)
print(ans)

Solution (Python):
b = input()
l = input().split()
a = 1
r = 0
for i in range(len(l)):
    a = int(l[i])
    while(a%2 == 0):
        a /= 2
        r += 1
print(r)

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

print(res)

Solution (Python):

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

sum_count = 0

for a_i in a:
    while 1:
        a_i = a_i / 2
        if a_i.is_integer():
            sum_count += 1
            continue
        else:
            break

print(sum_count)

Solution (Python):

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

Solution (Python):
from sys import stdin, stdout
from math import sqrt
from collections import defaultdict
def getCount(i):
    c = 0
    while i > 0:
        if i%2 == 0:
            c += 1
        else:
            break
        i//=2
    return c
n = int(input())
arr = [int(x) for x in input().split()]
count = 0
for i in arr:
    count += getCount(i)
print(count)

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

arr = input().split()

for i in range(N):
    arr[i] = int(arr[i])

cnt = 0

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

print(cnt)

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()))

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

Solution (Python):
def main():
    N = input()
    a = input().split()

    a = list(map(int,a))

    ans = 0

    for i in a:
        while True:
            if i%2==0:

                i = i/2
                ans+=1
                continue
            else:
                break

    print(ans)


if __name__ == "__main__":
        main()

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

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

print(ans)

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

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

print(ans)

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

total = 0
for i in A:
    counter = 0
    if i % 2 == 0:
        tmp = i
        while tmp % 2 == 0:
            tmp /= 2
            counter += 1
    total += counter
print(total)

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

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


ans=0

for i in a:
	ans+=yakusu(i)

print ans

Solution (Python):
def main():
    N = input()
    l = map(int, raw_input().split())
    result = 0
    for i in range(N):
        while l[i]%2 == 0:
            l[i] = l[i]/2
            result = result + 1
    print(result)


if __name__ == '__main__':
    main()

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


def num_of_two(number):
    ans = 0
    while number % 2 == 0:
        ans += 1
        number /= 2
    return ans

ans = 0
for num in a:
    ans += num_of_two(num)
print(ans)

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

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

def func(n):
    i = 0
    while True:
        if n % 2:
            break
        else:
            n //= 2
            i += 1
    return i

print(sum(map(func, a)))

Solution (Python):
from math import *
n=int(input())
a=list(map(int,input().split()))
a.sort()
opr=0
for i in range(n-1,-1,-1):
	if(a[i]%2==0):
		k=bin(a[i])[2:]
		for j in range(len(k)-1,-1,-1):
			if(k[j]=='0'):
				opr+=1
			else:
				break
print(opr)

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

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

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] //= 2

print(ans)

Solution (Python):
N=int(input())
line=input()
line=line.rstrip().split(" ")

list1=[]
for i in range(N):
    list1.append(int(line[i]))

count=0
i=0
for i in range(N):
    
    j=0
    for j in range(50):
        if list1[i]%2==0:
            count=count+1
            list1[i]=int(list1[i]/2)
        else:
            break
        
print(count)

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


def count(num):
    _num = num
    count = 0
    while _num / 2 >= 1 and _num % 2 == 0:
        _num = _num // 2
        count += 1
    return count


cnt_list = [count(a) for a in a_list]
cnt = sum(cnt_list)

print(cnt)

Solution (Python):
from math import log

n = int(input())
aaa = list(map(int, input().split()))
ans = 0
for a in aaa:
    ans += log(a & -a, 2)
print(int(ans))

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

x = 0

for n in range(N):
    a = li.pop()
    while a%2 == 0:
        x = x+1
        a = int(a/2)

print(x)

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

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

def checkhalf(n,i,flg):
    if n%2 ==0:
        return n/2,i+1,True
    else:
        return n,i,False

ans = 0
for a in A:
    n = a
    i = 0 
    flg = True
    while flg:
        n,i,flg = checkhalf(n,i,flg)
    ans = ans + i

print(ans)

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

result = 0
for i in range(n):
  temp = a[i]
  for j in range(a[i]):
    if temp % 2 == 0:
      temp //= 2
      result += 1
    else:
      break

print(result)

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]=a[i]//2
print(ans)

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

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

    print(t)


if __name__ == '__main__':
    main()

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

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

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

ans = 0

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

print(ans)

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




if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))

print(sum(list(map(cnt, a))))

Solution (Python):
num_array = int(input())
array = list(map(int, input().split(' ')))
result = 0;
for i in array:
    while not i==0:
        if i%2==0:
            i = i//2
            result += 1
        else:
            break
print(result)

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

def warizan(num):
    counter = 0
    while(num % 2 == 0):
        num = num / 2
        counter += 1
    return counter


_a = list(map(warizan,a))
print(sum(_a))

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

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

print(ans)

Solution (Python):
import functools
N = int(input())
A = [int(x) for x in input().split()]
P = functools.reduce(lambda a,b: a*b, A)
print(len(bin(P).split('1')[-1]))

Solution (Python):
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n = I()
a_ = Is()
c = 0
for e in a_:
    t = e
    while t > 1 and t/2 == t//2:
        c += 1
        t = t//2
print(c)

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

ans = 0
for num in num_list:
	while num%2 == 0:
		ans += 1
		num/=2
print(ans)

Solution (Python):
N = int(input())
A_N=list(map(int, input().split()))
c_sum = 0
for a_i in A_N:
    c = 0
    while True:
        if a_i %2 == 0:
            a_i /= 2
            c += 1
        else:
            break
    c_sum += c
print(c_sum)

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

ans = 0
for i in range(n):
    while True:
        if li[i] % 2 == 0:
            ans += 1
            li[i] = li[i] / 2
        else:
            break
print(ans)

Solution (Python):
import math
import numpy as np


def count_2(n):
    i = 0
    while True:
        if n % 2 == 0:
            i += 1
            n = n // 2
        else:
            break
    return i

N = int(input())

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

sum = 0
for aa in a:
    sum += count_2(aa)

print(sum)

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

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

print(ans)

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

print(count)

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

count = 0
while len(a_arr) > 0:
    a_arr = list(map(lambda x : x / 2, filter(lambda x : x % 2 == 0, a_arr)))
    count += len(a_arr)

print(count)

Solution (Python):
import math
N = int(input())
a = [int(num) for num in input().split()]
count = 0

for i in range(N):
    count += bin(a[i])[::-1].index("1")

print(count)

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

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


def count(n):
    """
    >>> count(10)
    1
    >>> count(96)
    5
    """
    c = 0
    while n % 2 == 0:
        n //= 2
        c += 1
    return c


s = 0
for i in range(N):
    s += count(A[i])

print(s)

Solution (Python):
N=int(input())
Prog=map(int,input().split())
c=0
for i in Prog:
    tmp=i
    while tmp%2==0:
        c+=1
        tmp=tmp/2

print(c)

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

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

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

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

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

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

Solution (Python):
N = int(input())
a = [int(i) for i in input().split()]
def times(n):
  if n%2==1:
    return 0
  else:
    return 1+times(n/2)
b = [times(n) for n in a]
ans =sum(b)
print(ans)

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

arr = map(int,raw_input().split())

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

print count

Solution (Python):


import math
import sys
import itertools
import numpy as np

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

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

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

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

N = int(input())
a = input().split()
ans = 0
for i in range(N):
    ans += Pow2(int(a[i]))
print(ans)

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

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

def f(n):
    r=0
    while True:
        if n%2!=0:
            break
        n//=2
        r+=1
    return r

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

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


def aaa(n):
    count = 0
    while n%1 == 0:
        n /= 2
        count +=1
    return count -1

print(sum(list(map(aaa,a))))

Solution (Python):
n = int(input())
arr = [int(a) for a in input().split()]

res = 0
for e in arr:
    tmp = e
    while True:
        if tmp % 2 == 0:
            res += 1
            tmp = tmp / 2
        else:
            break
print(res)