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 run(n, a):
    cnt = 0
    for i in range(n):
        while a[i] % 2 == 0:
            a[i] /= 2
            cnt += 1
    return cnt


def read_line():
    n, = input().split()
    a = input().split()
    n = int(n)
    a = [int(a[i]) for i in range(n)]
    return (n, a)


def main():
    n, a = read_line()
    print(run(n, a))


if __name__ == '__main__':
    main()

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

m=0

for i in range(n):
    o=0
    while o<1:
        if a[i]%2==0:
            m+=1
            a[i]=a[i]/2
        else:
            o=1
            
print(m)

Solution (Python):


import math

n = int(input())
i = input().split(' ')
a = list(map(lambda e:int(e), i))

step = 0
es = list(filter(lambda e:e%2==0, a))
os = list(filter(lambda e:e%2!=0, a))

def power_exponent(z):
    step = 0
    while z%2==0:
        step = step+1
        z = z/2
    return step

if len(es) == 0:
    pass
else:
    for e in es:
        step = step + power_exponent(e)
print(step)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
i=0
b=A
while len(b)>0:
    c=[]
    for number in b:
        if(number%2==0):
            c.append(number/2)
    i+=len(c)
    b=[]
    for number in c:
        if(number%2==0):
            b.append(number/2)
    i+=len(b)
print(i)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
counter = 0
check = [2]
e = 2
while 2**e <= 1000000000:
	check.append(2**e)
	e += 1
for i in range(n):
	if a[i]%2 == 0:
		for k in range(len(check)):
			if a[i]%check[k] == 0:
				counter += 1
			else:
				break
print(counter)

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

d = deque(A)
c = 0
while(len(d)>0):
    tmp = d.pop()
    if tmp%2==0:
        c+=1
        d.append(tmp//2)
print(c)

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

Solution (Python):
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
println = stdout.write

def cnt(n):
    i = 0
    while 1:
        n, mod = divmod(n, 2)
        if mod:
            break
        i += 1
    return i

def main():
    N = int(input())
    A = tuple(map(int, input().split()))

    ans = 0
    for i in A:
        ans += cnt(i)
    print(ans)

main()

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

Solution (Python):
n=int(raw_input())
a=[]
a=map(int,raw_input().split())
cnt=0
for i in xrange(n):
    while a[i]%2==0:
        cnt+=1
        a[i]/=2
print cnt

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

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

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

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

l = []
s = 1
count = 0

while(len(a) != 0):


	for i in xrange(0,len(a)):
		if a[i]%2 == 0 and a[i] != 0:
			l.append(a[i] >> 1)

	count += len(l)
	a = []
	a.extend(l)
	l = []

print count

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

print(num)

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

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

def check(x):
    times=0
    while(x%2==0):
        x=x/2
        times+=1


    return times


for i in range(n):
    ans+=check(lis[i])

print(ans)

Solution (Python):
def get_score(x):
    result = 0
    if (x % 2) != 0:
        return 0

    while ((x % 2) == 0) and (x >= 2):
        x = x//2
        result = result + 1

    return result


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

r = 0

for i in a:
    r = r + get_score(i)

print(r)

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


count = 0
for i in nums:
    w = i
    while not w & 1:
        w = int(w / 2)
        count += 1

print(count)

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

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

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

c = 0
f = False
while True:
	for i in range(n):
		if(a[i] % 2 == 0):
			a[i] /= 2
			c += 1
			f = True
	if f:
		f = False
	else:
		break

print(c)

Solution (Python):





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

num_division = (-1) * N

for a in A:
    while int(a) == a:
        a = a/2
        num_division += 1

print(num_division)

Solution (Python):
def to2(num):
    if num % 2 == 0:
        return int(num / 2)
    else:
        return num

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

cout = 0
for n in a:
    while True:
        ret_n = to2(n)
        if ret_n == n:
            break
        else:
            cout += 1
        n = ret_n

print(cout)

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

print(ans)

Solution (Python):
n = int(input())
a = [int(x) for x in input().split()]
count = 0
judge = False


odd = []

even = []


for i_a in range(len(a)):
    if(a[i_a] % 2 == 0):
        even.append(a[i_a])
    else:
        odd.append(a[i_a])

if(even == []):
    print(0)
    exit()


while True:
    count += 1
    even[0] /= 2
    if(even[0] % 2 != 0):
        even.pop(0)
    if(even == []):
        break
        

print(count)

Solution (Python):
import sys
tmp = int(input())
a = tmp
b = [int(i) for i in input().split()]
cnt_list = [0] * a
flag_cnt = 0
while flag_cnt < a:
    flag_cnt = 0
    for j in range(a):
        if b[j] % 2 == 0:
            b[j] /= 2
            cnt_list[j] += 1
        else:
            flag_cnt += 1
print(sum(cnt_list))

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

c = 0 
for a in As: 
    b = a 
    while b % 2 == 0:
        b = b/2 
        c = c + 1 

print(c)

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

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

ans = 0

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

print(ans)

Solution (Python):
def count(n):
    c = 0
    while True:
        if n % 2 == 1:
            break
        n /= 2
        c += 1
    return c

s = 0
n = int(input())
l = list(map(int, input().split()))
for a in l:
    s += count(a)
print(s)

Solution (Python):


string_list = [input().split() for i in range(2)]
arrayli = list(map(int,string_list[1]))

count = 0
flag = 0
for i in arrayli:
    for j in range(1,500000001):
        if( (i % pow(2,j)) == 0):
            count +=1
        else:
            break

print(count)

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

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

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


print(count)

Solution (Python):
import numpy as np

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

s = 0
for k in range(N):
    if a[k] % 2 == 0:
        j = 0
        while True:
            j += 1
            a[k] = a[k]/2
            if a[k] % 2 != 0:
                break
        s += j
print(s)

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

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

ans = 0
for i in range(1, 100):
    s = len([x for x in a_list if x % (2**i) == 0])
    if s == 0:
        break
    ans += s

print(ans)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
a = na()













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

Solution (Python):
def calc_power(x,y):
    count = 0
    while(x%y==0):
        x=x/y
        count = count + 1
    return count


n  = input()
li = list(map(int,input().split()))
count = 0
for i in li:
    count = count + calc_power(i,2)
print (count)

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
b=[0]*n
for j in range(40):
    for i in range(0,n):
        if a[i]%2==0:
            b[i]=b[i]+1
            a[i]=a[i]/2
        else:
            b[i]=b[i]
            a[i]=a[i]
print(sum(b))

Solution (Python):

N = int(input())
a = list(map(int, input().split()))
d = [0] * N

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

print(result)

Solution (Python):



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

sum_cnt = 0
for a in an:
    tmp = a
    cnt = 0
    while tmp % 2 == 0:
        cnt += 1
        tmp = tmp / 2

    sum_cnt += cnt

print(sum_cnt)

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

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

ans = 0
for i in range(N):
    for j in range(A[i]):
        if A[i] % 2 == 0:
            ans += 1
            A[i] = A[i]/2
        else:
            break
print(ans)

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

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=[]
cnt=0
for i in range(n):
    if a[i]%2==0:
        ans.append(a[i])
for i in ans:
    while i%2==0:
        cnt+=1
        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:
        count += 1
        a[i] /= 2
print(count)

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

print(count)

Solution (Python):

"""
Created on Sat Jun 16 21:57:11 2018

@author: ashida
"""

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

count = 0

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

print(count)

Solution (Python):
N = int(input())
A = list(map(int,input().split(" ")))
ans=0
for a in A:
    ans += len(bin(a)) - bin(a).rfind("1") -1
print(ans)

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

for n in range(N):
    for l in range(L[n]):
        if L[n]%2 == 0:
            L[n] /= 2
            count += 1
        else:
            break
            
print(count)

Solution (Python):
N = int(input())
lst = list(map(int, input().split()))
lst2 = []
def f(X):
    if X % 2 != 0:
        return 0
    return f(X / 2) + 1
for i in lst:
    lst2.append(f(i))
print(sum(lst2))

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]
count = 0
flag = 1
while flag != 0:
    flag = 0
    for i, a in enumerate(A):
        if a % 2 == 0:
            A[i] = a/2
            count += 1
            flag = 1
print(count)

Solution (Python):
n = int(raw_input())
a = map(int, raw_input().split())
number = 0

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

Solution (Python):
def is_even(a):
    return [ai%2 == 0 for ai in a]

def extract_2(ai):
    n = 0
    while ai % 2 == 0:
        ai /= 2
        n += 1
    return n

N = int(raw_input())
a = [int(s) for s in raw_input().split()]

any_even = is_even(a)

evens = [extract_2(a[i]) for i in range(N) if any_even[i]]
print sum(evens)

Solution (Python):
def count(tmp_N):
    count = 0
    while True:
        if tmp_N % 2 == 0:
            tmp_N = tmp_N / 2
            count += 1
        else:
            break
    return count


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

result = 0

for input_tmp in input_list:
    result += count(input_tmp)

print(int(result))

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

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

print(sum([soinnsuu(i) for i in a if i%2==0]))

Solution (Python):
n=int(input())
a=0
l=[int(i) for i in input().split()]
for i in l:
  t=2
  while t <=i:
    if i%t !=0:
      break
    else:
      a+=1
      t*=2
print(a)

Solution (Python):
N = int(input().strip())
 
A = list(map(int, input().strip().split()))
 
c = 0
if not all([a // 2 == 1 for a in A]):
  binA = [bin(a) for a in A]
  for a in binA:
    c += len(a) - a.rindex('1') - 1
print(c)

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


a_even = []
for a in a_list:
	if a % 2 == 0:
		a_even.append(a)

times = 0

while len(a_even) > 0:
	a_even[0] /= 2
	times += 1

	if a_even[0] % 2 == 1:
		a_even.pop(0)

print(times)

Solution (Python):

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

Solution (Python):
array_length = int(input())
input_line = input().split()

array_int = list(map(int, input_line))
array_bin = list(map(bin, array_int))
array_bin_str = list(map(str, array_bin))

array_dividable = []

for i in range(0, array_length):
    if array_int[i] == 0:
        array_dividable.append(0)
    else:
        target_line = array_bin_str[i]
        count_dividable = 0
        for j in range(1, len(target_line)):
            target_char = target_line[-j]
            if target_char == '1':
                break
            elif target_char == 'b':
                break
            else:
                count_dividable += 1

        array_dividable.append(count_dividable)

if sum(array_dividable) == 0:
    print("0")
else:
    print(str(sum(array_dividable)))

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

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

cnt = 0


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

print(cnt)

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



def count_even(a):
    if a % 2 == 1:
        return 0
    else:
        if a == 2:
            return 1
        return 1 + count_even(a/2)


cnt = 0

for a in l:
    cnt += count_even(a)


print(cnt)

Solution (Python):
import numpy as np
input()
a = np.array(list(map(int, input().split())))
a = np.delete(a, np.where(a%2==1))
cont = 0
while len(a) > 0:
    cont += 1
    a[0] /= 2
    if a[0] % 2 == 1:
        a = np.delete(a, 0)
print(cont)

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

counter = 0

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

print(counter)

Solution (Python):
import math

n = int(input())

array = [int(x) for x in input().split()]

res = 0
for i in array:
    if i %2 == 0:
        while True:
            res += 1
            i /= 2
            if i % 2 != 0:
                break
print(res)

Solution (Python):
N = (int)(input())
stex = input().split()
suu = []
for i in stex:
    suu.append((int)(i))
count = 0
for c in suu:
    unti = True
    while(unti):
        if(c%2 == 0):
            c = c/2
            count = count + 1
        else:
            unti = False
print(count)

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

def cal(x,ans):
    if len(x) == 0 :
        print(ans)
        return ans
    else :
        y = [i for i in x if i %2 == 0]
        for i in range(len(y)):
            y[i] /= 2.0
        ans += len(y)
        cal(y, ans)


cal(a,0)

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

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

Solution (Python):
N = int(input())
inp2 = input()
a = inp2.split()
count = 0
for i in range(int(N)):
	b = int(a[i])
	flag = True
	c = b
	while flag:
		c = c/2
		if c.is_integer():
			count+=1
		else:
			flag = False

print(count)

Solution (Python):

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

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

sum = 0

for i in range(len(l)):
    while l[i] & 1 == 0:
        l[i] = l[i] >> 1
        sum += 1

print(sum)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
def log_two(x):
	i = 0
	while x % 2 == 0:
		x //= 2
		i += 1
	return i

for a in A:
	ans += log_two(a)

print(ans)

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

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

Solution (Python):
N = int(input())
a = [int(_) for _ in input().split()]
ans = 0
for i in a:
  j = str(bin(i))
  ans += len(j)-int(j.rfind('1'))-1
print(ans)

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

Solution (Python):

N = int(input())
ip = input().split()
a =[]
for i in range(N):
    a.append(int(ip[i]))
f = []


for x in a:
    
    c = 0
    while x%2 == 0:
        c += 1
        x /= 2
    f.append(c)


print(sum(f))

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

for i in range(len(a)):
    if a[i]%2 == 0:
        a[i] = int(a[i]/2)
        cnt += 1
    else:
        a[i] = 0

while len(a) != a.count(0):
    for i in range(len(a)):
        if a[i]%2 == 0 and a[i] != 0:
            a[i] = int(a[i]/2)
            cnt += 1
        else:
            a[i] = 0

print(cnt)

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

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

print(count)

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

cnt = 0

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

	
	cnt += itemCnt

print(cnt)

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

Solution (Python):
def num_divisions(num):
    for i in range(1+num):
        if num % 2**i == 0:
            pass
        else:
            return i - 1
        
        
N = int(input())
A = list(map(int, input().split()))

cnt = 0
for a in A:
    cnt += num_divisions(a)
print(cnt)

Solution (Python):
N = int(input())
list = [int(i) for i in input().split()] 
  
count = 0
  
for j in range(N):
  flag = True
  num = list[j]
  while(flag == True):
    if num % 2 == 0:
      num /= 2
      count += 1
    else:
      flag = False
      
print(count)

Solution (Python):


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

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

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

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

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

print(cnt)

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

arr = str.split(" ")

count = 0

for a in arr:
    tmp = int(a)
    while(tmp%2 == 0):
        count += 1
        tmp = tmp/2

print(count)

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

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

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

Solution (Python):
_=input();print(sum(map(lambda x:(bin(int(x))[:2:-1]+"1").index("1"),input().split())))

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


res = 0
for n in a:
  while True:
    n,r = divmod(n, 2)
    if r != 0:
      break
    res += 1

print(res)

Solution (Python):


N = int(input())
A = list(map(int, input().split()))
B = sorted([x for x in A if x % 2 == 0])
cnt = 0
for i in B:
    while i % 2 == 0:
        i //= 2
        cnt += 1
print(cnt)

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

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

Solution (Python):

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

def dewaru(a):
    num = a
    ans = 0
    while(1):
        if(num%1!=0):
           break
        num=num/2
        ans+=1
        
    return ans-1
    
print(sum(map(dewaru,b)))

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

n = int(input())
print(sum(map(div_num, input().split())))

Solution (Python):


n = int(input())
aa = [int(x) for x in input().split()]

count = 0

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

print(count)

Solution (Python):


import os
import sys

def solution(N, A):
    res = 0
    sumTemp = -1
    while sumTemp != 0:
        sumTemp = 0
        for i in range(N):
            if A[i]%2 == 0:
                A[i] /= 2
                sumTemp += 1
        res += sumTemp
    return res

if __name__ == '__main__':
    N = int(raw_input())
    A = raw_input().split()
    for i in range(N):
        A[i] = int(A[i])
    result = solution(N,A)

    print str(result)

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

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

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

print("{}".format(ans))

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

count = 0
for a in ai:
    m = 1
    while (1 << m) <= a:
        if a % (1 << m) == 0:
            
            count += 1
        else:
            break
        m += 1
print(count)

Solution (Python):
def counter(value):
    count = 0
    while value % 2 == 0:
        count += 1
        value /= 2

    return count

n = int(input())

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

count = 0

for i in range(n):
    if a[i] % 2 == 0:
        count += counter(a[i])
        
print(count)

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

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

print(count)

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

Solution (Python):
n = int(input())
lists = list(map(int,input().split()))
count = 0

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

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

count = 0
while len(aN) > 0:
    tmp = list()
    for ai in aN:
        if ai % 2 == 0:
            ai = ai / 2
            count += 1
            tmp.append(ai)
    aN = tmp

print(count)

Solution (Python):

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

counter = 0
for a in A:
    tmp = a
    while True:
        if tmp == 0:
            break
        elif tmp % 2 == 0:
            counter += 1
            tmp = tmp // 2
        else:
            break


print(counter)

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

fil = list(filter(lambda x: x % 2 == 0, lis))


def soinsuu(giv):
    co = 0
    while True:
        if giv % 2 == 1:
            break
        giv /= 2
        co += 1

    return co


count = 0
for i in fil:
    import math
    count += int(soinsuu(i))
print(count)

Solution (Python):
import numpy as np
N=int(input())
la=list(map(int,input().split()))
lan=np.array(la)
count=0
while(1):
    if(np.any(lan%2==1)):
        lan=lan[~(lan%2==1)]
    if(np.any(lan%2==0)):
        lan=lan/2
        count=count+len(lan)
    else:
        break;
print(count)

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
counter = 0
for a in a_list:
   a_bin = bin(a)
   counter += len(a_bin) - a_bin.rfind('1') - 1
print(counter)

Solution (Python):

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

print(count)

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

Solution (Python):


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

i=int(0)
x=int(0)

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

print(i)

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

count=0
for i in a:
    count += len(bin(i))-bin(i).rfind("1")-1

print(count)

Solution (Python):
input()
xs = [int(x) for x in input().split()]
o = 0

for x in xs:
    while not(x % 2):
        x //= 2
        o += 1

print(o)

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

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

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

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

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

sum = 0
for a_int in a:
    a_int = int(a_int)
    count = 0
    flag = 0
    while flag == 0:
        if a_int % 2 == 0:
            a_int = a_int / 2
            count += 1
        else:
            flag = 1
            break
    sum += count
print(sum)

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())                                       
L = list(map(int, input().split()))
res = 0
for i in range(N):
    for j in range(30):
        if L[i]%(2**(30-j)) == 0:
            res += 30-j
            break
print(res)

Solution (Python):
def prime(x):
    c = 0
    while x%2 == 0:
        x = x/2
        c += 1
    return c
n = int(input())
nums = input().split()
c = 0
for i in nums:
    c += prime(int(i))
print(c)

Solution (Python):
N=int(input())
a=list((input().split()))
import sys
i=0
count=0
data= int(a[i])

while i<len(a):
    if data%2==0:
        data=data/2
        count+=1
    if data%2!=0:
        i+=1
        if i==len(a):
            print(count)
            sys.exit()
        data=int(a[i])

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

for i in range(0,N):
    x = seq[i]
    while x % 2 == 0:
        x = x // 2
        ans += 1

print(ans)

Solution (Python):
from sys import stderr
from functools import reduce
from operator import add
from math import log2
def f(): return [int(i) for i in input().split()]
def debug(*x): stderr.write(reduce(add,repr(x)).strip("()\',")+'\n')

n = int(input())
a = f()
ans = 0

for i in a:
    if i == 2:
        ans += 1
        continue
    for j in range(int(log2(i)),0,-1):
        if i % 2**j == 0:
            ans += j
            break
        else:
            pass

print(ans)

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

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

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

counter = 0

for i in range(inputN):
    while input[i] % 2 == 0:
        input[i] /= 2
        counter += 1

print (counter)

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):
n=int(input())
l=input().split()
sum=0
for i in l:
    x=int(i)
    while x%2==0:
        x=x/2
        sum=sum+1
print(sum)

Solution (Python):
input()
s=input().split()
res=0
for i in s:
 i=int(i)
 while True:
  if i%2==0:
   res+=1
   i//=2
  else:
   break
print(res)