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 sys
import math
from collections import defaultdict, deque, Counter
from copy import deepcopy
from bisect import bisect, bisect_right, bisect_left
from heapq import heapify, heappop, heappush
    
input = sys.stdin.readline
def RD(): return input().rstrip()
def F(): return float(input().rstrip())
def I(): return int(input().rstrip())
def MI(): return map(int, input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def LF(): return list(map(float,input().split()))
def Init(H, W, num): return [[num for i in range(W)] for j in range(H)]

def main():
    N = I()
    L = LI()
    ans = 0
    
    for i in L:
        while True:
            if i % 2==0:
                i //=2
                ans+=1
            else:
                break
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):

import sys
input=sys.stdin.readline
import numpy as np

def main():
    n = int(input())
    numbers=list(map(int,input().split()))
    numbers=np.array(numbers)
    count=0
    
    if np.all(numbers%2==1):
        print(0)
        exit()
    while True:
        if np.all(numbers%2==1)==True:
            break
        else:
            idx=np.where(numbers%2==0)
            count+=np.count_nonzero(numbers%2==0)
            numbers[idx]=numbers[idx]//2
    print(count)

if __name__=="__main__":
    main()

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

lst = []
for i in a:
    if i%2 == 0:
        lst.append(i)

def half(x):
    cnt = 0
    for i in range(x):
        if x%2 == 0:
            x = x//2
            cnt += 1
        else:
            break
    return cnt

ans = 0
for i in lst:
    ans += half(i)
    
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:
      ans += 1
      A[i]//=2
    else:
      break
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())

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



def div2(v, a):
    res = 0
    if v == 0:
        return res
    while v % a == 0:
        v = v//a
        res += 1
    return res


ans = 0
for a in al:
    ans += div2(a, 2)
print(ans)

Solution (Python):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for a in A:
        for i in range(1, 31):
            if a%(2**i) != 0:
                ans += i-1
                break
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):

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




def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


fact_list = []
for item in a:
    fact_list += prime_factorize(item)

print(fact_list.count(2))

Solution (Python):


import math

import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd


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

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

Solution (Python):



def main():
    _ = int(input())
    A = list(map(int, input().split()))
    ans = 0

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

    print(ans)

if __name__ == "__main__":
    main()

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

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

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

print(ans)

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

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

Solution (Python):

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

Solution (Python):
N = int(input())
N_List = list(map(int,input().split()))
cnt = 0
while len(N_List) != 0:
    N_List = [i//2 for i in N_List if i % 2 == 0].copy()
    cnt += len(N_List)
print(cnt)

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

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

def check(p):
  c = 0
  while p % 2 == 0:
    c += 1
    p //= 2
  return c

res = 0
for i in range(n):
  res += check(a[i])
print(res)

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

Solution (Python):



from functools import reduce

def divideCount(k):
    cnt = 0
    while k % 2 == 0:
        k //= 2
        cnt += 1
    return cnt

def solve(a):
    return sum(
        map(
            divideCount,a
        )
    )


def main():
    _ = int(input())
    a = list(map(int,input().split()))
    print('{}'.format(solve(a)))




if __name__ == '__main__':
  main()

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

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

def cal(x):
  if x % 2 != 0: return 0
  return cal(x//2)+1
  
for l in L:
  ans += cal(l)

print(ans)

Solution (Python):
N,*A = map(int,open(0).read().split())

cnt = 0
for a in A:
  for n in range(1,31):
    if a%(2**n)!=0:
      cnt += n-1
      break
print(cnt)

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n = i_input()
    l = i_list()
    ans = 0
    for i in l:
        while i%2 == 0:
            ans += 1
            i //= 2
    print(ans)



if __name__=="__main__":
    main()

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

c=0

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

Solution (Python):

"""
Created on Fri Sep 18 10:08:18 2020

@author: liang
"""
N = int(input())
A = [int(x) for x in input().split()]
ans = 0
for a in A:
    while a%2 == 0:
        a //= 2
        ans += 1
print(ans)

Solution (Python):
input()
print(sum([len(bin(a&-a))-3 for a in map(int,input().split())]))

Solution (Python):
input()
print(sum(map(lambda a:len(bin(int(a)&-int(a)))-3,input().split())))

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):
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()))
counter=[]
for num in range(len(A)):
  counter.append(0)
for num in range(len(A)):
  while A[num]%2==0:
    A[num]=A[num]/2
    counter[num]+=1
print(sum(counter))

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

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

print(count)

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


if __name__ == '__main__':
    main()

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

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

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

if __name__ == "__main__":
    solve()

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

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

A = [findout(s) for s in S]
print(sum(A))

Solution (Python):




def resolve():
    import sys
    input = sys.stdin.readline

    n = int(input().rstrip())
    a_list = [int(x) for x in input().rstrip().split(" ")]

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

    print(ans)

if __name__ == "__main__":
    resolve()

Solution (Python):
N = int(input())
As = input().split(' ')
As = [int(As[i]) for i in range(N)]
EVEN = 0
for i in range(N):
  if As[i]%2 == 0:
    while As[i]%2 == 0:
      As[i] /= 2
      EVEN += 1
print(EVEN)

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

Solution (Python):
import sys

def factorize(n):
    if n == 2:
        return [2]
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        break
    return fct


input = sys.stdin.readline

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

count_2 = 0
for a in a_list:
    count_2 += len(factorize(a))

print(count_2)

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

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

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()))
ans=0
for i in range(n):
  while True:
    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()))

M = []
for i in A:
    if i % 2 == 0:
        M.append(i)

ans = 0
for j in M:
    while j%2 == 0:
        j //= 2
        ans += 1

print(ans)

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

def f_2(i):
  ans = 0
  while i % 2 == 0:
    ans += 1
    i //= 2
  return ans

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

Solution (Python):


def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    N = int(input())
    a = list(map(int, input().split()))

    return N, a


def get_divisible_count(x: int) -> int:
    """
    2で何回割ることができるかを返す.

    Args:\n
        x (int): 整数

    Returns:\n
        int: 2で割ることができる回数
    """
    divisible_count = 0
    while x % 2 == 0:
        divisible_count += 1
        x /= 2
    return divisible_count


def main(N: int, a: list) -> tuple:
    """
    メイン処理.

    Args:\n
        N (int): 数列の長さ(1 <= N <= 10000)
        a (list): 数列(1 <= a_i <= 1000000000)

    Returns:\n
        tuple: [description]
    """
    ans = 0
    for n in range(N):
        ans += get_divisible_count(a[n])

    
    print(ans)


if __name__ == "__main__":
    
    N, a = get_input()

    
    main(N, a)

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

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

Solution (Python):
import math

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

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

print(ans)

Solution (Python):


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




def get_divisible_count(x: int) -> int:
    divisible_count = 0
    while x % 2 == 0:
        divisible_count += 1
        x /= 2
    return divisible_count


ans = 0
for n in range(N):
    ans += get_divisible_count(a[n])


print(ans)

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

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

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

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

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

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

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

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

print(ans)

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

ans = 0
for i in a:
    while i % 32 == 0:
        i //= 32
        ans += 5
    while i % 2 == 0:
        i //= 2
        ans += 1

print(ans)

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

ans = 0
for i in a:
    while i % 32 == 0:
        i //= 32
        ans += 5
    while i % 2 == 0:
        i //= 2
        ans += 1

print(ans)

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

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

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

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

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

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

print(ans)

Solution (Python):
def divide_by_2(n):
    cnt = 0
    while True:
        if n % 2 == 0:
            n //= 2
            cnt += 1
        else:
            break
    return cnt


def main():
    n = int(input())
    a_list = list(map(int, input().split()))
    ans = 0

    for a in a_list:
        ans += divide_by_2(a)

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == '__main__':
    main()

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

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

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

print(ans)

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

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

print(ans)

Solution (Python):
import numpy as np
n = int(input())
a = np.array(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())
A = list(map(int, input().split()))
list1 = []
for i in range(N):
  cnt = 0
  if A[i] % 2 ==1:
    continue
  else:
    while A[i] % 2 == 0:
      cnt += 1
      A[i] = A[i]//2
    list1.append(cnt)

if list1 == []:
  print(0)
elif len(list1) == 1:
  print(list1[0])
else:
  print(sum(list1))

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):
n = int(input())
a = list(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 a:
    while i%2==0:
        ans+=1
        i=i/2

print(ans)

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

num_of_factor_2 = []

for i in range(len(a_list)):
    a_trial = 0
    while a_list[i] % 2 == 0:
        a_list[i] = a_list[i] / 2
        a_trial += 1
    num_of_factor_2.append(a_trial)
    
print(sum(num_of_factor_2))

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

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

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

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

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

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

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

print(ans)

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

n = int(input())
a = list(map(int,input().split()))
ans = 0
for j in a:
	ans += twos(j)
print(ans)

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

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

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

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

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

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

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

Solution (Python):


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

    C = 0
    for i in range(N):
        if lia[i] % 2 ==0:
            tmp = lia[i]
            while tmp % 2 ==0:
                tmp = tmp / 2
                C += 1

    print(int(C))

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


def count_2(x, num):
    if x % 2 == 0:
        return count_2(x // 2, num + 1)
    else:
        return num


ans = 0
for i in range(n):
    ans += count_2(a[i], 0)

print(ans)

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


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


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

print(ans)

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

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

res = 0
for i in range(N):
  fi_flg = False
  while fi_flg is False:
    if a[i] % 2 == 0:
      a[i] = int(a[i]/2)
      res += 1
    else:
      fi_flg = True
      
print(res)

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

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

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

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

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

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

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

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

    for i in range(n):
        a = a_lst[i]

        while a % 2 == 0:
            count += 1
            a //= 2

    print(count)


if __name__ == '__main__':
    main()

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

    ans = 0

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



if __name__ == "__main__":
    main()

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

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

print(s)

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

cnt = 0

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

print(cnt)

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

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

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

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

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

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

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

Solution (Python):
'''
Created on 2020/08/17

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N=int(pin())
  a=list(map(int,pin().split()))
  ans=0
  for i in a:
    if i%2==1:
      continue
    t=i
    while True:
      if t%2==0:
        t=t//2
        ans+=1
      else:
        break
  print(ans)
  return

main()

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

ans = 0

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

print(ans)

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

ans = 0

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

print(ans)

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


for i in a:
    while z == 0:
        if i % 2 == 0:
            i = i // 2
            ans += 1
        else:
            z += 1
    z = 0

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 chk(n):
    global dic
    cnt = 0
    while n%2==0:
        n = n//2
        cnt += 1
    dic.setdefault(cnt,0)
    dic[cnt] += 1
    return cnt

dic = {}
dic.setdefault(0,0)
n = int(input())
a = list(map(int,input().split()))
for i in range(n):
    tmp = chk(a[i])

ans = 0
for item in dic.items():
    ans += item[0]*item[1]
print(ans)

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

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

Solution (Python):
import math

N = int(input())
lists = [ int(v) for v in input().split(" ") ]

total = 0

for l in lists:
  if l % 2 == 0:
    while True:
      if l % 2 == 0:
        l = int(l/2)
        total += 1      
      else:
        break
print(total)

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()



def main():
    _ = int(input().strip())
    A = [int(i) for i in input().strip().split()]
    cnt = 0
    for a in A:
        x = a
        while x % 2 == 0:
            x = x // 2
            cnt += 1
    print(cnt)
    return


if __name__ == "__main__":
    main()

Solution (Python):
def prime_factor_2(n):
  if n % 2 == 0 and n % 4 != 0:
    return 1
  if n % 2 == 1:
    return 0
  
  return 1 + prime_factor_2(int(n/2))

N = int(input())
A = list(map(lambda a: int(a), input().split(" ")))
print(sum([prime_factor_2(a) for a in A]))

Solution (Python):
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    A = nl()
    ans = 0
    for a in A:
        while a % 2 == 0:
            a //= 2
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

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