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 is_even(n):
    if n%2 == 0:
        return True
    else:
        return False


N = int(input())
A = list(map(int,input().split()))
 
c = 0
for i in range(N):
    if is_even(A[i]):
        tmp = A[i]

        while is_even(tmp):
            c += 1
            tmp = tmp / 2
            
            if is_even(tmp) == False:
                break

    else:
        continue
    
print(c)

Solution (Python):
N = int(input())
a = list(int(i) for i 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 = [int(i) for i in input().split()]

from operator import mul
from functools import reduce

even_list = list(filter(lambda x:x%2==0, a))

if len(even_list) == 0:
    print(0)
else:

    count = 0

    for m in even_list:
    
        while True:
            m = m / 2
            count += 1
    
            if m % 2 == 1:
                break

    print(count)

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



print(sum)

Solution (Python):




if __name__ == '__main__':
    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):
N = int(input())
A = list(map(int, input().split()))

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

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

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

Solution (Python):
def soin_to(n):
    N = n
    i = 0
    while(N%2 == 0):
        i += 1
        N /= 2
    return i

N = int(input())
nums = list(map(int, input().split()))
count = 0
for i in range(N):
    count += soin_to(nums[i])

print(count)

Solution (Python):

def main():
    n = int(input().strip())
    a = [int(i.strip()) for i in input().split(' ')]

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

    print(ans)
    

if __name__ == '__main__':
    main()

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

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

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

def half(num, count):
    count += 1
    if num % 2 == 0:
        count = half(num//2, count)
    return count

for num in a:
    if num % 2 == 0:
        count += half(num//2, 0)

print(count)

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

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

print(cnt)

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

def f(num):
  n=1
  r=0
  while 2**n <= num:
    if num%2**n == 0:
      r=n
    n+=1
  return r


s=0
for i in range(N):
  if a[i]%2==0:
    s+=f(a[i])

print(s)

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

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

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

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

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

b = [n for n in a if n%2 == 0]

cnt = 0
for n in b:
    while n % 2 != 1:
        n = n/2
        cnt += 1

print(cnt)

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
count = 0
i = 0
while (True):
	if (a[i] % 2 == 0):
		a[i] /= 2
		count += 1
		continue
	i += 1
	if(i >= len(a)):
		break

print(count)

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

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

c = 0
for a in aa:
    sa = bin(a)
    for i in range(len(sa) - 1, -1, -1):
        if sa[i] == '0':
            c += 1
        else:
            break

print(c)

Solution (Python):
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
a0 = []
for _ in range(n):
    i = 0
    x = a[_]
    while 1:
        if x % 2 == 0:
            x = x / 2
            i += 1
        else:
            break
    a0.append(i)
print(sum(a0))

Solution (Python):
import math
n = int(input())
a_tmp = input().split()
a = [[] for i in range(n)]
for i in range(n):
    a[i] = int(a_tmp[i])
a2 = [[] for i in range(n)]
for i in range(n):
    tmp = a[i]
    coun = 0
    while 1:
        if tmp % 2 == 0:
            tmp = tmp/2
            coun += 1
        else:
            break
    a2[i] = coun

print(sum(a2))

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

count = 0

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

print(count)

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

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

Solution (Python):
def solution(a):
    cnt = 0
    for x in a:
        while (x & 1) == 0:
            x >>= 1
            cnt += 1
    return cnt

def main():
    n = int(raw_input().strip())
    a = [int(i) for i in raw_input().strip().split()]
    print solution(a)

if __name__ == '__main__':
    main()

Solution (Python):
def div2(n):
	i = 0
	while True:
		if n % 2 == 1:
   			return i
		else:
			i += 1
			n /= 2
n = input()
ns = map(int, input().split())
print(sum([ div2(n) for n in ns ]))

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

Solution (Python):
N = input()
A = list(map(bin, map(int, input().split())))
ans = 0
for i in A:
  j = -1
  while True:
    if i[j] == "0":
      ans += 1
      j -= 1
    else:
      break
print(ans)

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

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

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

ans = 0

for x in l:
    ans += two(x)

print(ans)

Solution (Python):
N = int(input())
A_list = list(map(int, input().split()))
total_cnt = 0
cnt_list = []

for i in range(N):
    cnt_list.append(0)

    while (A_list[i] % 2 == 0):
        A_list[i] /= 2
        cnt_list[i] += 1

    total_cnt += cnt_list[i]

print(total_cnt)

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

cnt = 0

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

Solution (Python):
N=input()
N = [int(i) for i in input().split(" ")]
num = []
for i in N:
    count = 0
    temp = i
    while(1):
        if temp%2 == 0:
            temp = temp/2
            count += 1
        else:
            break
    num.append(count)

print(sum(num))

Solution (Python):
import math

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

answer = 0
for a in A:
    tmp = a
    while True:
        if tmp % 2 == 1:
            break
        answer += 1
        tmp = math.floor(tmp / 2)

print(str(answer))

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

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

flags = [0] * N
limit = 0
for i, num in enumerate(Arr):

    if num  % 2 == 0:
        cnt = 1
        while True:
            num = num // 2
            if not num < 1 and not num % 2 == 0:
                break
            cnt += 1
        flags[i] = cnt

print(sum(flags))

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

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

print(twos)

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

Solution (Python):
N = int(input())
List = list(int(i) for i in input().split())
count = 0

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

for i in List:
    count += cal(i)

print(count)

Solution (Python):


num = int(raw_input())
li = list(map(int,raw_input().split()))
count = 0
while True:
    li = list(filter(lambda x:x%2 ==0,li))
    count += len(li)
    if len(li) == 0:
        break
    li = list(map(lambda x: x/2,li))
print count

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

result = 0 
for a_itm in a:
    while(not(a_itm%2)):
        a_itm //= 2
        result+=1

print(result)

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

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

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

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

print(b)

Solution (Python):
import math
n = input()
a = list(map(int, input().split()))
ans = 0
for i in a:
    ans = ans + (len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

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

print(sum(count_list))

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

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

c = 0

for i in range(N):
    a = LIST[i]

    while a % 2 == 0:
        a = int(a /2)
        c += 1

print(c)

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

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

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

cnt = 0
for a in As:
    while a > 0 and a % 2 == 0:
        a //= 2
        cnt += 1

print(cnt)

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

def divcount(a):
    from itertools import count
    for i in count():
        if a % 2 != 0:
            return i
        a /= 2

print(sum(divcount(a) for a in As))

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

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

def two_factor(n) :
    cnt = 0

    while n % 2 == 0:
        n /= 2
        cnt += 1

    return cnt 
    
fact_cnt = 0
for a in alist :
    fact_cnt += two_factor(a)
    
print(fact_cnt)

Solution (Python):
_ = input()
print(sum(map(lambda n: len(bin(n)) - len(bin(n).rstrip("0")), list(map(int, input().split())))))

Solution (Python):
_ = input()
print(sum(list(map(lambda n: len(bin(n)) - len(bin(n).rstrip("0")), list(map(int, input().split()))))))

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

print(sum)

Solution (Python):
input()
def f(a):
  a = int(a)
  r = 0
  while a % 2 == 0:
    a /= 2
    r += 1
  return r
print(sum(map(f, input().split())))

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

result = 0

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

print(result)

Solution (Python):


def a2(num):
	t=num
	c=0
	while t %2==0:
		c += 1
		t=t/2
	return c
		



a = int(raw_input())

ary= map(int, raw_input().split())
ret=sum([a2(x) for x in ary])
print  ret

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

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

r = 0
i = 1

while True:
  f = False
  for a in aas:
    if a%2**i == 0:
      r += 1
      f = True
  if not f:
    break
  i += 1
print(r)

Solution (Python):
num=int(input())
lis=list(map(int,input().split()))
nums=1
counter=0
for i in lis:
  while i%2==0:
    i=i/2
    counter=counter+1
print(counter)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
def countbin(x):
    cnt = 0
    while x%2 == 0:
        cnt += 1
        x = x // 2
    return cnt
print(sum(map(countbin, a)))

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

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

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

Solution (Python):


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

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

def digit(i):
    a=0
    while True:
        Flag = int(i%2)
        if Flag==1:
            break;
        i = i/2
        a=a+1
    return(a)

        
Total=0
for i in A:
        add = digit(i)
        Total=Total+add
print(Total)

Solution (Python):
import math


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()))
count = 0

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

print(count)

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

count=0

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

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

Solution (Python):
def solve(n, a):
    ans = 0
    for i in range(n):
        while a[i] % 2 == 0:
            a[i] /= 2
            ans += 1
    return ans

assert solve(3, [5,2,4]) == 3
assert solve(4, [631,577,243,199]) == 0
assert solve(10, [2184,2126,1721,1800,1024,2528,3360,1945,1280,1776]) == 39

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

Solution (Python):
n = int(input())
lis = list(map(int,input().split()))
ans = 0
def f(x):
 if x%2:
  return(0)
 else:
  return(f(x//2)+1)
for i in range(n):
 ans += f(lis[i])
print(ans)

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

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] /= 2;
    count += 1
print(count)

Solution (Python):
input()
def div2(n):
	i=0
	while n%2==0:
		i,n=i+1,n/2
	return i
arr=map(div2,map(int,input().split()))
print(sum(arr))

Solution (Python):


if __name__ == "__main__":
    n = input()
    a = list(map(int,input().split()))
    m = 0
    for i in a:
        n = 0
        while i % 2 == 0:
            i = i / 2
            n = n + 1
        m = m + n
    print(m)

Solution (Python):
n = input()

power_2 = 0

val = map(int, raw_input().split(' '))

for i in val:
	while i % 2 == 0:
		i /= 2
		power_2 += 1

print power_2

Solution (Python):


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




N=int(input())
a=spaceinput()

def warisu(x):
    count=0
    for i in range(10**10):
        if x%2!=0:
            break
        x=x/2
        count+=1
    return count


res=0
for sa in a:
    res+=warisu(sa)

print(res)

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

input() 
print(sum(map(count, map(int, input().split()))))

Solution (Python):


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

ans = 0
for i in l:
    tmp = i
    num = 0
    while (tmp % 2 == 0):
        num += 1
        tmp /= 2
    ans += num

print(ans)

Solution (Python):
def read():
    return int(input())


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


def readmap():
    return map(int, input().split())


N = read()
A = readlist()

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

print(cnt)

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):
def main():
    
    N = int(input())
    A = map(int, input().split())
    ans = 0
    
    for a in A:
        while a%2 == 0:
            ans += 1
            a /= 2
            
    print(ans)
    
if __name__ == "__main__":
    main()

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

Solution (Python):
def xx(x: int):
    """
    2で何回割れるのか
    """
    counter = 0
    while True:
        x_, y = divmod(x, 2)
        if y != 0:
            return counter
        x, counter = x_, counter + 1

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

res = 0
for n in ns:
    res += xx(n)
print(res)

Solution (Python):
n = int(input())
a = 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 = list(map(int, input().split()))
count = 0
while True:
	odd = 0
	for i in range(N):
		if a_list[i] % 2 == 0:
			a_list[i] = int(a_list[i] / 2)
			count += 1
		else:
			odd += 1
	if odd == len(a_list):
		break
print(count)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
for i in range(n):
  l[i] = l[i] * 3
c = 0
for i in range(n):
  t = l[i]
  j = 0
  while True:
    if not t % 2 == 0:
      c += j
      break
    else:
      t = t // 2
    j += 1
print(c)

Solution (Python):

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

cnt = 0

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

print(cnt)

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

cnt = 0

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

print(cnt)

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

cnt = 0

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

print(cnt)

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

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

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 = map(int,input().split())
A = map(int,input().split())

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

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

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

print(ans)

Solution (Python):
input()
n = [int(i) for i in input().split()]
index = 0
count = 0
while index < len(n):
    if n[index] % 2 == 0:
        n[index] /= 2
        n[index] = int(n[index])
        count += 1
    else:
        index += 1
print(count)

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

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

print(count)

Solution (Python):
raw_input()
aN = map(lambda x: bin(int(x))[2:], raw_input().split(' '))

count = 0
for a in aN:
    count += len(a)-len(a.strip('0'))

print count

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

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

Solution (Python):
N = int(input())
As = [int(e) for e in input().split()]
c = 0

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

print(c)

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(N):
    ans += str(bin(a[i]))[::-1].index('1')
print(ans)

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

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

Solution (Python):



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

if any([True if i % 2 == 0 else False for i in a]):
    for i in a:
        while i % 2 == 0:
            i = i/2
            counter += 1
    print(counter)

else:
    print(0)

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())
a = list(map(int,input().split()))
ans = 0
for x in a:
  c = 0
  while x%2 == 0:
    c += 1
    x //= 2
  ans += c
print(ans)

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

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

    ans = 0
    for i in range(n):
        ans += func(a[i])
    print(ans)

Solution (Python):

def check(num):
    if num%2:
        return 0
    else:
        return 1

def process(num):
    count = 0
    while(num%2 == 0):
        num //= 2
        count += 1
    return count

if __name__ == "__main__":
    n = int(input())
    a = list(map(process, [ tmp for tmp in list(map(int, input().split())) if check(tmp) ]))
    ans = sum(a)
    print(ans)

Solution (Python):
import sys
if __name__ == "__main__":
    N = int(input())
    A = list(input().split(' '))
    cnt = 0
    for ele in A:
        ele = int(ele)
        while ele % 2 == 0:
            cnt += 1
            ele = ele / 2.0
    print(cnt)

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

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

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

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

for i in arr:
    if i % 2 == 0:
        ans += div(i)
print(ans)

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

Solution (Python):
N = int(input())
List = input()
import re

Shift = re.split(" ",List)
Ctr = 1
Wlist = []


for Ctr in range(1,N+1):
    Xn = 1
    DW = int(Shift[Ctr-1])
    while True:
        if DW % (2**Xn) != 0:
            break
        else:
            Xn += 1
    Wlist.append(Xn-1)
    Ctr += 1

print(sum(Wlist))

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):
def count_2(n):
    count = 0
    while n % 2 == 0:
        count += 1
        n = n >> 1
    return count

_ = input()
a = map(int, input().split())
print(sum(map(count_2, a)))

Solution (Python):
def f(x):
	return 0 if int(x)%2 else f(int(x)//2)+1
n = input()
print(sum(list(map(f,input().split()))))

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

ct = 0

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

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

count = 0

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

print(count)

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

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


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

count = 0

for i in range(n):
  target = s[i]
  while s[i] % 2 == 0:
    if(target % 2 == 1):
      break
    else:
      count += 1
      target = int(target/2)

print(count)

Solution (Python):
s = [input() for i in range(2)]
a = int(s[0])
b = [int(bi) for bi in s[1].split(' ')]

n = 0
for bi in b:
    while bi % 2 == 0:
        n += 1
        bi = bi / 2
print(n)

Solution (Python):
from math import log2


def action(n):
    count = 0
    while n % 2 == 0:
        n //= 2
        count += 1
    else:
        return count

def main():
    _n = int(input())
    nums = [int(x) for x in input().split()]

    print(sum([int(action(e)) for e in nums if e % 2 == 0]))

if __name__ == '__main__':
    main()

Solution (Python):
from math import log2

N = input()
number = input()

a = number.split()
n_list=[]
count=0



for num in a:
    num = int(num)
    if num % 2 == 0:
        n_list.append(num)


if n_list != []:
    maxnum = max(n_list)
    maxnum = log2(maxnum)
    maxnum = int(maxnum)
    for num2 in n_list:
        for i in range(maxnum):
            if num2 % 2**(i+1) == 0:
                count+=1


print(count)

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

for ll in l:
    q=0
    while q==0:
        if ll%2==0:
            w+=1
            ll=ll/2
        else:
            q=1
print(w)

Solution (Python):
import math
import sys

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

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

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

print(cnt)

Solution (Python):
def count_2(n):
    count = 0
    while n % 2 == 0:
        count += 1
        n = n >> 1
    return count

_ = input()
a = map(int, input().split())
print(sum(map(count_2, a)))

Solution (Python):
import numpy as np
N=int(input())
a=np.array(list(map(int, input().split(' '))))
count=0
i=1
while 2**i<a.max():
    count+=(a%(2**i)==0).sum()
    i+=1
print(count)

Solution (Python):
dustshoot = input()

def insu2(n):
    if n == 0:
        return 0

    counter = 0
    flag = 0
    while(flag == 0):
        flag = n % 2
        if flag == 0:
            counter += 1
            n = n / 2
        else:
            break
    return counter

ip = input().split()
usdata = []
c_sum = 0

for i in ip:
    usdata.append(int(i))

for i in usdata:
    add = insu2(i)
    c_sum += add

print(c_sum)

Solution (Python):
n = int(input())
line = input()
liststr = line.split()
list = []
 
for i in liststr:
    i = int(i)
    list.append(i)
 
 
cc = 0
for r in list:
    while r%2 == 0:
        r = r / 2
        cc = cc + 1
 
 
print(cc)

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

Solution (Python):
N = int(raw_input())
a = [int(x) for x in raw_input().split()]
s = 0
for ai in a:
  while ai%2 == 0:
    s+=1
    ai/=2
print s