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



Sample input:
3
5 2 4


Sample output:
3

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = input()
even = [int(i) for i in input().split() if int(i) % 2 == 0]
i = 0
while len(even) != 0:
    i = i + len(even)
    even = [i // 2 for i in even if (i // 2) % 2 == 0]
print(i)

Submission status: Accepted

Solution code:
# encoding: utf-8
N = int(input())
a = list(map(int, input().split()))

ans = 0
for ai in a:
    ai_tmp = ai
    ans_tmp = 0
    for i in range(32):
        if ai_tmp % 2: break
        else:
            ans_tmp += 1
            ai_tmp = ai_tmp // 2
    ans += ans_tmp

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int,input().split()))
b=0
for i in range(N):
    for j in range(1,31):
        if a[i]%(2**j)!=0:
            b+=j-1
            break
print(b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def cnt(x):
    res = 0
    while x != 0:
        if x % 2 != 0:
            break
        x //= 2
        res += 1
    return res

ans = sum([cnt(a) for a in A])
print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
array = list(map(int,input().split(" ")))
i = 0
count = 0
while i < N:
    if array[i]%2 == 0:
        array[i] = array[i]/2
        count+=1
    else:
        i+=1
print(count)

Submission status: Accepted

Solution code:
N = int(input())
cc = 0
for a in [int(i) for i in input().split()]:
    while True:
        if a%2 == 1:
            break
        else:
            cc += 1
            a = a//2

print(cc)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
al = list(map(int, input().split()))
res = 0
for a in al:
    t = 0
    while a%2==0:
        a //= 2
        t += 1
    res += t
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

ret = 0

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

print(ret)

Submission status: Accepted

Solution code:
input();print(sum([len(bin(i).split('1')[-1]) for i in list(map(int,input().split()))]))

Submission status: Accepted

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

print(b)

Submission status: Accepted

Solution code:
N = int(input())
in_str = [int(i) for i in input().split()]

count = 0
for i in range(N) :
	while True :
		if (in_str[i] % 2 == 0) :
			in_str[i] = in_str[i] / 2
			count += 1
			continue
		break

print(count)

Submission status: Accepted

Solution code:
N = int(input())

A = [i for i in map(int,input().split())]

count = 0

for a in A:

    while True:

        harf = a/2

        if harf == int(harf):

            a = harf

            count += 1

            continue

        else:

            break

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
counter = 0

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

print(counter)

Submission status: Accepted

Solution code:
n = int(input())
a = [x for x in map(int, input().split()) if x % 2 == 0]
ans = 0
n = len(a)
for x in a:
    while x % 2 == 0:
        x //= 2
        ans += 1
print(ans)

Submission status: Accepted

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

ans = 0

for i in arr:
	while i % 2 != 1:
		i = i / 2
		ans += 1
		
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lis = list(map(int,input().split()))
num = 0
for nu in lis:
  while nu % 2 == 0:
    num += 1
    nu = nu // 2
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(num)

Submission status: Accepted

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

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

Submission status: Accepted

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

res = 0

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

print(res)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
a = list(li())

ans = 0
for ai in a:
    b = bin(ai)[2:]
    ans += b[::-1].index("1")
    
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int,input().split()))
x = 0

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

Submission status: Accepted

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

res = 0
for e in a:
    if e % 2 == 0 :
        ebin = bin(e)
        res += len(ebin) - (ebin.rfind('1')+1)

print(res)

Submission status: Accepted

Solution code:
#ABC100C
import math
N=int(input())
a=list(map(int, input().split()))
ans=0
for i in range(N):
    t=a[i]
    while t%2==0:
        t/=2
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split(' ')]
for i in range(n):
  j=0
  while(True):
    if a[i]%2==0:
      j+=1
      a[i]=a[i]//2
    else:
      a[i]=j
      break
print(sum(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
iN = int(input())
def parse2(a):
    i = 0
    while a % 2 == 0:
        i+=1
        a >>= 1
    return i
print(sum(parse2(_) for _ in map(int,input().split())))

Submission status: Accepted

Solution code:
iN = int(input())

def parse2(a):
    i = 0
    while a % 2 == 0:
        i+=1
        a //= 2
    return i

print(sum([parse2(int(_)) for _ in input().split()]))

Submission status: Accepted

Solution code:
input()
lst = [int(x) for x in input().split()]
cnt = 0
for x in lst:
    while x % 2 == 0:
        x = x / 2
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import string
input=sys.stdin.readline

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
ans = 0
check = [0]*30
for i in range(1, 31):
    check[i-1] = 2**i

for i in A:
    if i % 2 == 0:
        j = 0
        while check[j] <= i:
            if i % check[j] == 0:
                add = check[j]
            else:
                break
                
            j += 1
        ans += j
        
print(ans)

Submission status: Accepted

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

total=0
for a in A:
    tmp=0
    while(1):
        if(a%(2**tmp)==0):
            tmp+=1
        else:
            break
    total+=tmp-1
print(total)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    s = sum(f(x) for x in a)
    print(s)

def f(n):
    c = 0
    while n & 0x01 == 0:
        c += 1
        n >>= 1
    return c

main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
count = 0
p = 0

a = [int(m) for m in a]

while p != len(a):
    for i in range(n):
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
            count += 1
        else:
            p += 1
    if p != len(a):
        p = 0

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

    print(ans)


if __name__ == "__main__":
        main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

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

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

Submission status: Accepted

Solution code:
import numpy
N = int(input())
a = [int(i) for i in input().split()]
b = 0
i = 0
while i < N:
    if a[i] % 2 == 0:
        b = b + 1
        a[i] = a[i] / 2
    else:
        i = i+1

print(b)

Submission status: Accepted

Solution code:
n = int(input())
l = [int(_) for _ in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# *3 or /2
n = int(input())
a = list(map(int, input().split()))
c = 0
for num in a:
    p = num
    for i in range(30):
        if p % 2 == 0:
            c += 1
            p //= 2
        else:
            break
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a=int(input())
c=0
def div2(a):
    global c
    c+=bin(a)[::-1].index("1")
for x in input().split():
    div2(int(x))
print(c)

Submission status: Accepted

Solution code:
n = int(input())
nums = map(int,input().split())

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

print(count)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
s = 0

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

print(s)

Submission status: Accepted

Solution code:
N = input()
alist = [int(i) for i in input().split()]
d = 0
for i in alist:
  while i % 2 == 0:
    i = i / 2
    d += 1
print(d)

Submission status: Accepted

Solution code:
n = int(input())
alist = [int(x) for x in input().split()]
twolist = [536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2]

count = 0
for x in alist:
  for i,num in enumerate(twolist):
    if x % num == 0:
      count += (29-i)
      break
print(count)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in a:
    for j in range(1,30):
        if i % (2 ** j) == 0:
            ans += 1
            pass
        else:
            break
print(ans)

Submission status: Accepted

Solution code:
def cul(x,y):
    if x%2 == 0:
        return cul(int(x/2),y+1)
    else:
        return y

N = int(input())
A = list(map(int,input().split(" ")))
count = 0
for i in range(len(A)):
    count += cul(A[i],0)
print(count)

Submission status: Accepted

Solution code:
Num_of_pr = int(input())
a_i = [int(i) for i in input().split()]
counter = 0
for i in range(Num_of_pr):
    while a_i[i]%2 == 0:
        counter += 1
        a_i[i] /= 2
print(counter)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(raw_input())
a=map(int,raw_input().split())
s=0
for i in a:
  for j in range(100):
    if i%(2**(j+1))!=0:
      s+=j
      break
print s

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
s=0
a=[int(i) for i in input().split()]
for i in range(1,31):
    t=0
    for j in a:
        if j%(2**i)==0:
            s+=1
            t+=1
        else:
            continue
    if t==0:
        break
print(s)

Submission status: Accepted

Solution code:
input();print(sum(bin(i)[::-1].index('1') for i in map(int,input().split())))

Submission status: Accepted

Solution code:
input();print(sum([bin(i)[::-1].index('1')for i in map(int,input().split())]))

Submission status: Accepted

Solution code:
input();print(sum([bin(i)[::-1].index('1')for i in map(int,input().split())]))

Submission status: Accepted

Solution code:
input();print(sum([bin(i)[::-1].index('1') for i in map(int,input().split())]))

Submission status: Accepted

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

factor2 = 0
for number in list_a:
    while number % 2 == 0:
        number /= 2
        factor2 += 1

print(factor2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def count_div(num, mod):
    cnt = 0
    r = 0
    while r == 0:
        q, r = divmod(num, mod)
        if r == 0:
            num = q
            cnt += 1

    return cnt

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

ans = 0
for v in a:
    ans += count_div(v, 2)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
listA = list(map(int, input().split()))
count =0
index=0
while index < len(listA):
    while True:
        if listA[index]%2==1:
            break
        else:
            listA[index]/=2
            count+=1
    index+=1

print(count)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(x) for x in input().split()]

def main():
    ans = 0
    for i in range(N):
        n = A[i]
        while True:
            quotient, reminder = divmod(n, 2)
            if reminder != 0:
                break
            n = quotient
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
input();print(sum(bin(int(x))[::-1].index('1')for x in input().split()))

Submission status: Accepted

Solution code:
input()
print(sum([bin(i)[::-1].index("1")for i in map(int,input().split())]))

Submission status: Accepted

Solution code:
input();print(sum([bin(i)[::-1].index("1") for i in map(int,input().split())]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

a = []
for part in input().split():
    a.append(int(part))

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
C - *3 or /2
https://abc100.contest.atcoder.jp/tasks/abc100_c

"""
import sys
from sys import stdin
input = stdin.readline


def solve(data):
    ans = 0
    for d in data:
        while d % 2 == 0:
            ans += 1
            d //= 2
    return ans


def main(args):
    N = int(input())
    data = [int(i) for i in input().split()]
    ans = solve(data)
    print(ans)

if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

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

    return count

print(sum(map(f, a)))

Submission status: Accepted

Solution code:
n=int(input())

a=list(map(int,input().split()))
b=[]
sum=0

for i in range(n):
  cnt=1
  while (a[i])%(2**cnt)==0:
    cnt+=1
  b.append(cnt-1)

for i in range(n):
  sum=sum+b[i]
  
print(sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()

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

even_sum = 0

for x in arr:
    while x % 2 == 0:
        x /= 2
        even_sum += 1

print(even_sum)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
count=0
i=0
while 1:
    if i>n-1:
        print(count)
        break
    b=a[i]%2
    if b!=0:
        i+=1
    elif b==0:
        a[i]/=2
        count+=1

Submission status: Accepted

Solution code:
N = int(input())
print(sum([bin(ai)[:1:-1].find('1') for ai in map(int, input().split())]))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N = inp()
aa = inpl()
ans = 0
for a in aa:
	while a%2 == 0:
		a //= 2
		ans += 1

print(ans)

Submission status: Accepted

Solution code:
# coding:utf-8


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


n = int(input())
A = inpl()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

count_A =[]
for i in range(N):
    count = 0
    while A[i]%2 == 0:
        A[i] = A[i]/2
        count += 1
    count_A.append(count)
print(sum(count_A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def count2(n):
	cnt = 0
	now = n
	while now % 2L == 0:
		cnt = cnt + 1L
		now = now / 2L
	return cnt

N = long(raw_input())
A = map(long, raw_input().split())
sum = 0L
for i in range(0, N):
	sum = sum + count2(A[i])
print sum

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

r = 0

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

print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
        
def getEven(N):
    cnt = 0
    while N % 2 == 0:
        cnt += 1
        N /= 2
    return cnt

def solve(Ai, N):
    ans = 0
    for a in Ai:
        ans += getEven(a)
    return ans

if __name__ == "__main__":

    N = int(input())
    Ai = map(int, input().split())
    print(solve(Ai, N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def factorize(c):
 s=0
 while c%2==0:
  s=s+1
  c=c/2 
 return s

print(sum(map(factorize, a)))

Submission status: Accepted

Solution code:
print(0*int(input())+sum(list(map(lambda x:sum([0 if int(x)%(2**i) else 1 for i in range(1,30)]),input().split()))))

Submission status: Accepted

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

def times(N):
    t = 0
    while (N%2==0 and N//2>0):
        N = N//2
        t += 1
    return t

T=0
for i in range(n):
    T += times(a[i])

print(T)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())

def div2(x):
    ret = 0
    while x%2==0:
        x /= 2
        ret += 1
    return ret

ret = 0
for a in input().split(" "):
    a = int(a)
    ret += div2(a)

print(ret)

Submission status: Accepted

Solution code:
N = int(input())
Seq = list(map(int, input().split()))
def order_2(n): #2でのオーダー
    ans = 0
    while n % 2 == 0:
        ans += 1
        n //= 2
    return ans
print(sum([order_2(a) for a in Seq]))

Submission status: Accepted

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

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

Submission status: Accepted

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

answer = 0 
while len(A):
    A = list(filter(lambda x: x % 2==0, A)) 
    answer += len(A)
    A = [int(a/2) for a in A]

print(answer)

Submission status: Accepted

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

co=0

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

print(co)

Submission status: Accepted

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