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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
import math

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



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

print(m)

Solution (Python):
import collections
N = int(input())
A = filter(lambda x: x%2 == 0,map(int,input().split()))
C = collections.Counter(A)
ans = 0
for key in C.keys():
    tmp = key
    count = 0
    while tmp%2 == 0:
        tmp //= 2
        count += 1
    ans += C[key]*count
print(ans)

Solution (Python):
n = int(input())
s = list(map(int,input().split()))
A = [i for i in s if i % 2 == 0]

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

print(count)

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Solution (Python):

import math


def inp():
    return(int(input()))



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



def instr():
    s = input()
    return(list(s[:len(s)]))



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


def getn(n):
    c = 0
    while n % 2 == 0:
        n = n // 2
        c += 1
    return c


N = inp()
a = inlist()
c = 0
for i in a:
    c += getn(i)

print(c)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
def div2(m):
    i = 0
    while m % 2 == 0:
        m = m // 2
        i += 1
    return i
total = 0
for j in a:
    total += div2(j)
print(total)

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 = list(map(int,input().split()))
B = [0]*N
for i in range(N):
    while A[i]%2==0:
        B[i] +=1
        A[i] = A[i]//2
print(sum(B))

Solution (Python):
import sys

N = int(input())
A = list(map(int, sys.stdin.readline().rsplit()))

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

print(res)

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

point = 0

for i in li:
    while i%2 == 0:
        i //= 2
        point += 1

print(point)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





N = I()
a = IL()
l = [int_log(x&-x,2) for x in a]
P(sum(l))

Solution (Python):
def count_div_by_two(n: int):
    c = 0
    while n % 2 == 0:
        n //= 2
        c += 1
    return c


N = int(input())
A = list(map(int, input().split()))
count_A = list(map(count_div_by_two, A))
print(sum(count_A))

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

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

print(ans)

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

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

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

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
nl = []
for i in range(n):
  bn = bin(a[i])
  nl.append(bn[2:])
count = 0
for i in range(len(nl)):
  lnl = list(nl[i])
  rlnl = lnl[::-1]
  bil = [i for i, x in enumerate(rlnl) if x == '1']
  count += bil[0]
print(count)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18


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

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

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

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

Solution (Python):
def div_two(x):
    tmp = 0
    cur = x
    while cur % 2 == 0:
        tmp += 1
        cur = cur // 2
    return tmp


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

ans = 0

for i in range(n):
    ans += div_two(A[i])

print(ans)

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


def main():
    N = int(input())
    a = list(map(int, input().split(' ')))
    exp_2 = list(map(f, a))
    print(sum(exp_2))


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

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

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

ctr = 0

for i in range(N):
    n = A_s[i]
    ctr += count_even(n)

print(ctr)

Solution (Python):
n = int(input())
a_list = [int(x) for x in input().split()]

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

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

def cnt(n):
    return format(n, 'b')[::-1].find('1')

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

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

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


N = int(input())
numbers = tuple(map(int, input().split(' ')))
print(sum([contains2(n) for n in numbers]))

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


cnt = 0

for i in n:
    if(i%2==0):
        ans = 0
        while(i>1 and i%2==0):
            ans+=1
            i>>=1
        cnt+=ans
            
print(cnt)

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

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

print(ans)

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

count = 0
for i in a:
    tmp = i
    for j in range(10000):
        if tmp%2 == 0:
            tmp /=2
            count += 1
        else:
            break

print(count)

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

counter = 0
ans = 1

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

print(counter)

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

Solution (Python):

n = int(input())


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


c = 0




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

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

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


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

for i in range(N):
    ans += calc(a[i])

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

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

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    A = [int(a) for a in input().split()]
    count = 0
    for i in range(N):
        while A[i] % 2 == 0:
            A[i] //= 2
            count += 1
    print(count)

    return 0

if __name__ == "__main__":
    solve()

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

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


c = 0

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

Solution (Python):
n=input()
A=list(map(int,input().split()))
s=0
while bool(A):
    A=[int(i/2) for i in A if i%2==0]
    s+=len(A)
print(s)

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(n):
    m = a[i]
    while True:
        if m % 2 == 0:
            ans += 1
            m = m//2
        elif m % 2 == 1:
            break
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    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)
resolve()

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

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

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


def solve():
    N = int(input().rstrip())
    vec =list(map(int, input().split())) 
    ANS = 0
    for v in vec:
        while v%2 == 0:
            v /=2;
            ANS += 1;

    print(ANS)
    

if __name__ == '__main__':
    solve()

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod=10**9+7

def coutwo(n):
    count=0
    flag=True
    while flag==True:
        if n%2==0:
            count+=1
            n=n//2
        else:
            flag=False
    return count

n=I()
lis=LI()
ans=0
for i in range(n):
    ans+=coutwo(lis[i])
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] //= 2
    ans += 1
print(ans)

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

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

print(ans)

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

Solution (Python):

import re
import math
from collections import defaultdict
from collections import deque
import itertools
from copy import deepcopy
import random
import time
import os
import queue
import sys
import datetime
from functools import lru_cache

readline=sys.stdin.readline
sys.setrecursionlimit(2000000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_pow(a,b):
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def get_primes(n,type="int"):
    if n==0:
        if type=="int":return []
        else:return [False]
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=""):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
    return ret
def seifu(x):
    return x//abs(x)

def main():
    N=int(input())
    A=list(map(int,input().split()))
    ni=[0]*N
    for a in range(N):
        now=A[a]
        cnt=0
        while now%2==0:
            now//=2
            cnt+=1
        ni[a]=cnt
    print(sum(ni))

main()

Solution (Python):
import sys
import numpy as np


def main():
  scan = sys.stdin.readline
  
  n = int(scan().rstrip())
  a = np.array(tuple(int(a_i) for a_i in scan().rstrip().split()))
  
  print(int(np.sum(np.log2(a & -a))))


if __name__ == "__main__":
  main()

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

ans = 0

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

print(ans)

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

ans=0
for i in A:
    t = i
    if i%2!=1:
        while t%2==0:
            t//=2
            ans+=1
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] = a[i]//2
    count += 1
print(count)

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

Solution (Python):
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):
def div2(n):
  count = 0
  while True:
    if n%2!=0: break
    n /= 2
    count += 1
  return count

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

count = 0
for i in range(N):
  count += div2(a[i])
print(count)

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

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

def pow_2_sum(N):
    count = 0
    while N%2 == 0:
        N = N/2
        count+=1
    return count

x = 0
for i in range(N):
    x = x +pow_2_sum(num_list[i])

print(x)

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

Solution (Python):
def main():
    n, *a = map(int, open(0).read().split())
    ans = 0
    for x in a:
        b = bin(x)
        ans += b[::-1].index("1")
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n, *a = map(int, open(0).read().split())
    ans = 0
    for x in a:
        b = bin(x)
        ans += x.bit_length() - b.rfind("1") + 1
    print(ans)


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

Solution (Python):
def factor(n, i):
    count = 0
    while n % i == 0:
        count += 1
        n = n // i
    return count


def main():
    n, *a = map(int, open(0).read().split())
    ans = sum([factor(x, 2) for x in a])
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
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()))
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()))
def count(x):
    c=0
    while x>0:
        if x%2==0:
            c+=1
            x=x//2
        else:
            break
    return c

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

Solution (Python):





N = int(input())
list = [int(i) for i in input().split() if int(i) % 2 == 0]
count = 0
for i in list:  
    while i % 2 == 0:  
        i = i / 2
        count = count + 1
print(count)

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

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
even_num=[0]*n

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

    even_num[i]=cnt

ans=sum(even_num)
print(ans)

Solution (Python):
n=int(input())
a=list(map(int, input().split()))
even_num=[0]*n

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

    even_num[i]=cnt

ans=sum(even_num)
print(ans)

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

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

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

    print(ans)
    
resolve()

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

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

print(ans)

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    N=int(readline())
    A=list(map(int,readline().split()))

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

    print(res)
if __name__=="__main__":
    main()

Solution (Python):
N = int(input())
list_ai = map(int,input().split())
list1 = [pow(2,i) for i in range(1,35)]
count1 =0
for elem in list_ai:
  for x in list1:
    if elem % x ==0:
      count1 +=1
    else:
      break

print(count1)

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

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

def check(a):
    cnt=0
    for i in range(10**9):
        if a%2==0:
            cnt+=1
            a=a//2
        else:
            break
    return cnt
ans=0
for i in range(N):
    ans+=check(A[i])

print(ans)

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


ans = 0
while a_inputs:
    x = a_inputs.pop(0)
    while x%2==0:
        x=x//2
        ans+=1
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:
        ans+=1
        a[i]=a[i]//2
        
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(2000000)



n = int(input())

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

Solution (Python):


def main():
    *N, = map(int, open(0).read().split())
    A = N[1:]
    N = N[0]

    cnt = 0
    for i in A:
        if i % 2 == 0:
            for j in range(0, max(A)):
                i = i//2
                cnt = cnt + 1
                if (i < 2) or not (i % 2 == 0):
                    break
    print(cnt)


main()

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

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

print(ans)

Solution (Python):


def main():
    n = int(input())
    alist = [int(i) for i in input().split()]
    count = 0
    for u in range(n):
        uu = alist[u]
        while True:
            if uu % 2 == 0:
                uu = uu//2
                count += 1
            else:
                break
    print(count)

main()

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

Solution (Python):
from collections import defaultdict

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

m = defaultdict(int)

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

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

Solution (Python):
from functools import reduce

def f(a):
    i = 0
    a,r = divmod(a, 2)
    while r == 0:
        i += 1
        a,r = divmod(a, 2)
    return i

n = int(input())
print(reduce(lambda x,y:x+y, map(f, map(int, input().split()))))

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

ans = 0
for number in lis:
    while number%2 == 0:
        number /= 2
        ans += 1
print(ans)

Solution (Python):
def waru(a):
    ans = 0
    for _ in range(a):
        if a %2 ==0:
            a = a//2
            ans+=1
        else:
            break
    return ans
n=int(input())
A =list(map(int,input().split()))
B = [waru(A[i]) for i in range(n)]
print(sum(B))

Solution (Python):
def f(x):
	cnt = 0
	while(x>0 and x % 2 == 0):
		x /= 2
		cnt+=1
	return cnt

n = int(input())
arr = list(map(int,input().split()))
ans = 0
for x in arr:
	ans += f(x)
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 and a[i] > 0:
        ans += 1
        a[i] //= 2

print(ans)

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