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

import math
import heapq
import bisect
import numpy as np
from collections import Counter


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

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

print(ans)

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

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

print(ans)

Solution (Python):
import math
n=int(input())
a=list(map(int,input().split()))
ans=0
cal=[2**i for i in range(29,0,-1)]
for i in a:
    for num,j in enumerate(cal):
        if i%j==0:
            ans+=29-num
            break
print(ans)

Solution (Python):
def warizan(n):
    flag = True
    count = 0
    while flag == True:
        if n/2 == n//2:
            count += 1
            n = n/2
        else:
            flag = False
    return count

import math
n = int(input())
lis = list(map(int, input().split()))
new_lis = [warizan(l) for l in lis if l%2 == 0]
print(sum(new_lis))

Solution (Python):

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

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

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

total = 0
for e in a:
  total += f(e)
print(total)

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

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

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

    print(ans)
main()

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

Solution (Python):
def ord(N,n):
    if n%N!=0:
        return 0
    else:
        return 1+ord(N,n//N)

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

m=0
for i in range(0,N):
    m=m+ord(2,a[i])
print(m)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i in range(n):
    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

def cnt(x):
    if x%2==1:
        return 0
    else:
        return cnt(x//2)+1
for i in range(n):
    ans+=cnt(a[i])
print(ans)

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

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

count = 0

for s in seq:
    while s % 2 == 0:
        count += 1
        s /= 2

print(count)

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

ans = 0

for i in a:
    ii = i
    while ii > 0 and ii % 2 == 0:
            ans += 1
            ii /= 2

print(ans)

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

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a2 = [i for i in a if i%2==0]
ans = 0
def saiki(i):
    if i == 1 or i%2 != 0:
        return 1
    return 1 + saiki(i//2)
if len(a2)==0:
    print(0)
else:
    for i in a2:
        ans += saiki(i//2)
    print(ans)

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

def two(n):
	count = 0
	while n%2 == 0:
		n = n/2
		count += 1
	return count
	
l = []
for i in range(n):
	l.append(two(a[i]))
	
print(sum(l))

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

Solution (Python):
n, *a = map(int, open(0).read().split())

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

print(count)

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

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
ans = 0
def keta2(n):
    count = 0
    while(1):
        if n % 2 == 0:
            count += 1
            n = n //2
        else:
            break
    return count

for i in range(N):
    if a[i] % 2 == 0:
        ans += keta2(a[i])
print(ans)

Solution (Python):
import sys
input = sys.stdin.buffer.readline

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

def f(n):
  res = 0
  while n % 2 == 0:
    n //= 2
    res += 1
  return res

answer = 0
for a in A:
  answer += f(a)

print(answer)

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

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

Solution (Python):
from math import log2, ceil

def solve(n, A):
    def count_div2(m):
        if m % 2 == 1:
            return 0
        l, r = 0, ceil(log2(m)) + 1
        while r - l > 1:
            p = (r + l) // 2
            if m % (2 ** p) == 0:
                l = p
            else:
                r = p
        return l
    return sum(count_div2(a) for a in A)

_n = int(input())
_A = map(int, input().split())
print(solve(_n, _A))

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

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


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


for num in nums:
    ans += count(num)
print(ans)

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

huga = list(map(int, input().split()))
ans=0
for i in range(number):
  while huga[i]%2 ==0:
    ans +=1
    huga[i]=int(huga[i]/2)

print(ans)

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

c = 0
for ii in range(n):
  c += format(a[ii],"b")[::-1].find("1")
print(c)

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

cnt = 0

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

Solution (Python):
import sys
 
stdin = sys.stdin

mod = 1000000007
inf = 1 << 60
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n = ni()
a = na()

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

print(ans)

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

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

Solution (Python):
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


N = int(sys.stdin.buffer.readline())
A = list(map(int, sys.stdin.buffer.readline().split()))

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

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

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

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):
import math
n = int(input())
a = list(map(int,input().split()))
g_c = sum([1 for i in a if i%2==0]) 
c = 0
for i in a:
  if i%2==0:
    while(i%2==0):
      i = i//2
      c += 1
print(c)

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

Solution (Python):

import sys
import math
import os
import itertools

class cin():
    def int():
        return int(sys.stdin.readline().rstrip())
    def string():
        return sys.stdin.readline().rstrip()
    def mapInt():
        return [int(x) for x in cin.string().split()]
    def stringList(n):
        return [input() for i in range(n)]

class Util():
    def round_up(a,b):
        return -(-a // b)
    def toUpperMultiple(a,x):
        return Util.round_up(a,x) * x
    def toLowerMultiple(a,x):
        return (a // x) * x

N = cin.int()
A = cin.mapInt()

ans = 0
for x in A:
    ans += format(x,"b")[::-1].find("1")
print(ans)

Solution (Python):
n = int(input().strip())
a = list(map(int, input().split()))
print(sum([format(num, 'b')[::-1].find('1') for num in a]))

Solution (Python):
n = int(input().strip())
a = list(map(int, input().split()))
print(sum([format(num, 'b')[::-1].find('1') for num in filter(lambda x: x % 2 == 0, a)]))

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 = [int(x) for x in input().split()]

ans = 0
while (1):
   b = [x % 2 for x in a]
   ans += b.count(0)
   if (0 not in b):
      break

   a = [int(a[i]/2) if b[i]==0 else a[i] for i in range(n)]

print(ans)

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


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


ans = 0
for aa in a:
    if aa % 2 == 0:
        ans += t(aa)

print(ans)

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

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

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):
def time2(n):
  ans = 0
  while n % 2 == 0:
    n /= 2
    ans += 1
  return ans
N = int(input())
LA = list(map(int, input().split()))
sum = sum(map(time2, LA))
print(sum)

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

print(ans)

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

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

i = 0
count = 0

while i < n:
    if a[i]%2 == 0:
        a[i] = a[i] / 2
        count += 1
    else:
        i += 1

print(count)

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

Solution (Python):
def is_even(n):
    return n & 1 == 0

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


count = 0
for v in a:
    while is_even(v):
        v = int(v / 2)
        count += 1

print(count)

Solution (Python):
import math
N =int(input())
nums = [int(i) for i in input().split(' ')]


ans =0
for i in nums:
  while(1):
    if i%2 == 0:
      ans += 1
      i //= 2
    else:
      break

print(ans)

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

t=0
c=0
while(N>c):
    if(A[c]%2==0):
        t+=1
        A[c]//=2
    else:
        c+=1
print(t)

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

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

cnt = 0

for i in A:
    for n in range(1,1000):
        if i % (2**n) == 0 :
            cnt += 1
        else:
            break
print(cnt)

Solution (Python):
import sys
input = sys.stdin.readline



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

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

    print(ans)


    
    

if __name__ == '__main__':
    main()

Solution (Python):
int(input())
print(sum(map(lambda a: format(int(a), 'b')[::-1].index('1'), input().split())))

Solution (Python):
int(input())
print(sum(map(lambda a: format(int(a), "b")[::-1].index("1"), input().split())))

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
print(sum([format(A[i], 'b')[::-1].find('1') for i in range(N)]))

Solution (Python):
def main():
    _ = int(input())
    a = list(map(int,input().split()))
    count = 0
    for i in a:
        while True:
            if i%2 == 0:
                i = i//2
                count += 1
            else:
                break
    print(count)
    
if __name__ == '__main__':
    main()

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


main()

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

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

print(ans)

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

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

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

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

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 = [int(i) for i in 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()))
ans = 0
for i in a:
    while not i %2:
        i//= 2
        ans += 1
print(ans)

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

seki = 1

for a_i in A:
        seki *= a_i
'''
count = 0

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

count = 0

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

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

for a_i in A:
        seki *= a_i

count = 0

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

count = 0

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

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

mul = [0] * n

for i in range(n):
	for j in range(1, 31):
		if ls[i] % (2 ** j) != 0:
			mul[i] = j - 1
			break

print(sum(mul))

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

print(cnt)

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

def f(num):
    cnt = 0
    while num %2 ==0:
        num = num//2
        cnt += 1
    return cnt

print(sum(f(i) for i in a))

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

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

Solution (Python):

N=int(input())
A=list(map(int,input().split()))
ans=0
def tw(n):
    cnt=0
    while True:
        if n%2==0:
            n=n//2
            cnt+=1
        else:
            return cnt
for i in range(N):
    
    ans+=tw(A[i])
print(ans)

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

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

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

print(ans)

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

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

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

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

print(ans)

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

def factorization(n):
    arr = {}
    temp = n
    i = 2
    if temp % i == 0:
        cnt = 0
        while temp % i == 0:
            cnt += 1
            temp //= i
        arr[i] = cnt

    return arr

ans = 0
for a in A:
    arr = factorization(a)
    if 2 in arr:
        ans += arr[2]
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in a:
    buf=i
    ans+=format(buf,'b')[::-1].find('1')
print(ans)

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

print(counter)

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

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

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

for i in a:
    num = i
    cnt+=format(num, 'b')[::-1].find('1')

print(cnt)

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

count = 0

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

print(count)

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


for i in a:
    while not i%2:
        i//=2
        ans+=1

print(ans)

Solution (Python):
import math
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in a:
  keta = int(math.log2(i))+1
  for j in range(keta):
    if (i >> j & 1) != 0:
      cnt += j
      break
print(cnt)

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

"""素因数分解"""
def factrize(n):
    b = 2
    fct = []
    while b*b <= n:
        while n % b == 0:
            n //= b
            
            """
            if not b in fct:
                fct.append(b)
            """
            fct.append(b)
        b = b+1
        break
    return len(fct) 

ans = 0

for i in lst1:
    if i == 2:
        ans += 1
    else:
        ans += factrize(i)

print(ans)

Solution (Python):
import sys

n, *a = map(int, sys.stdin.read().split())

def main():
    cnt = 0
    for i in a:
        while not i % 2:
            i //= 2
            cnt += 1
    
    return cnt
    
if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):

import sys


def solve(N: int, a: "List[int]"):
    answer = 0
    for i in range(N):
        while a[i]%2 == 0:
            answer += 1
            a[i] //= 2
    
    print(answer)
    return


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

if __name__ == '__main__':
    main()

Solution (Python):


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

def trial_division(n):
  
  counter = 0
  while n % 2 == 0:
      n //= 2
      counter += 1
  return counter

result = 0

for a in A:
  if a % 2 != 0: continue
  if a == 2:
    result += 1
  else:
    result += trial_division(a)

print(result)

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

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):
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

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

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
li = [int(i) for i in input().split()]
sum = 0
a = 1
for i in range(N) :
    while(a) :
        if li[i]%2 == 0 :
            sum +=1
            li[i]/=2
        else :
            break
print(sum)

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

B = []
for a in A:
    if(format(a, 'b')[::-1].find('1') >= 1):
        B.append(format(a, 'b')[::-1].find('1'))

print(sum(B))

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

Solution (Python):


import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, *B  = map(int,input_data().split())

out = 0
for i in B:
  d = i
  while d % 2 == 0:
    d = d / 2
    out += 1

print(out)

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

Solution (Python):
n = map(int, input().split())
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())
num_list = list(map(int, input().split()))

ans = 0
for i in num_list:
    while i % 2 == 0:
        ans += 1
        i = i / 2

print(ans)

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

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

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

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):
n=int(input())
import math
s=list(map(int, input().split()))
count=0
for num in s:
    while True:
        if num%2==0:
            num=math.ceil(num/2)
            count+=1
        else:
            break
print(count)

Solution (Python):
N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    if i%2 == 0:
        c = 0
        for l in range(30):
            i /= 2
            c += 1
            if i%2 != 0:
                ans += c
                break
print(ans)

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

ans = 0

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

print(ans)

Solution (Python):
import math
import numpy as np
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(n):
    b.append(format(a[i], 'b')[::-1].find('1'))
    
print(sum(b))

Solution (Python):

import sys
input = sys.stdin.readline



n = int(input())
N = map(int, input().strip().split())

s = 0
for n in N:
    c = 0
    d, r = divmod(n, 2)

    while r == 0:
        d, r = divmod(d, 2)
        c += 1
    s += c

print(s)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    A = LI()
    cnt = 0
    for a in A:
        while a % 2 == 0:
            a = a//2
            cnt += 1
    print(cnt)
main()

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

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
A=1
ANS=IND=0
while A!=0:
  A = 0
  for i in range(IND, N):
    if L[i] % 2 == 0 and A == 0:
      L[i] = L[i] // 2
      A = 1
      break
    else:
      IND += 1
  if A != 0:
  	ANS += 1
print(ANS)

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

for x in A:
    if x % 2 == 0:
        count += 1
        A.append(x / 2)

print(count)

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

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

print(ans)

Solution (Python):

import sys
input = sys.stdin.readline

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

Solution (Python):

import sys
import math

def solve(N: int, a: "List[int]"):
    
    def factorization(n):
        factor = []
        n_ = n
        for i in range(2, int(math.sqrt(n) + 1)):
            if i == 3:
                break
            if n_ % i == 0:
                cnt = 0
                while n_ % i == 0:
                    n_ = n_ // i
                    cnt += 1
                factor.append([i, cnt])
        if n_ != 1:
            factor.append([n_, 1])
        if n == []:
            factor.append([n, 1])
        return factor

    ans = 0
    for ai in a:
        factor = factorization(ai)
        if factor[0][0] == 2:
            ans += factor[0][1]

    print(ans)

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

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(n):
    ans+=len(bin(A[i]))-bin(A[i]).rfind('1')-1
print(ans)

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

Solution (Python):
import sys
import numpy as np
input = sys.stdin.readline
N = int(input())
a = [int(x) for x in input().split()]
ans = 0
for i in a:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i //= 2
    ans += cnt
print(ans)

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

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


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

Solution (Python):
import sys
readline = sys.stdin.readline
n = int(readline())
def two(a):
  c = 0
  while not (a & 1):
    c += 1
    a >>= 1
  return c
slst = sum([two(int(i)) for i in readline().split()])
print(slst)

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

input()
a=list(map(int,input().split()))
ans=0
for num in a:
  ans+=ct_2(num)
print(ans)

Solution (Python):
int(input())
print(sum(map(lambda num: format(int(num), "b")[::-1].index("1"), input().split())))

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

def even(n):
	ret = 0
	while n%2==0:
		n=n//2
		ret+=1
	return ret
ans=0
for i in range(N):
	ans+=even(A[i])
print(ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
evens = [x for x in a if x%2 == 0]

ans = 0
for x in evens:
    while x%2 == 0:
        x //= 2
        ans+=1

print(ans)

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

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

ans = 0
for _ in range(30):
    ans += sum([(a - 1) % 2 for a in A])
    A = [a // 2 for a in A if a % 2 == 0]

print(ans)

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

print(ans)

Solution (Python):
input()
a = [int(i) for i in input().split()]
ans = 0
for i in a:
  ai = i
  for j in range(i):
    if ai % 2 == 0:
      ans += 1
      ai //= 2
    else:
      break
print(ans)