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

if __name__ == '__main__':
    hoge = input()
    max_count = 0
    for x in input().split():
        x = int(x)
        if x % 2 != 0:
            continue
        max_count += foo(x)
    print(max_count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
a = list(map(int,input().split()))
ans = 0
a = np.array(a)
while a.size > 0:
    a = a[a%2 == 0]
    ans += len(a)
    a = a//2
print(ans)

Submission status: Accepted

Solution code:
n = input()
a = map(int, raw_input().split())
ans = 0
donotbreak = True
for i in range(n):
	if a[i] % 2 == 0:
		donotbreak = False
		break
if donotbreak:
	print ans
	exit()
for i in range(n):
	while a[i] %2 == 0:
		ans += 1
		a[i] /= 2
print ans

Submission status: Accepted

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

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

print(output)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    a = [int(x) for x in stdin.readline().rstrip().split()]
    count = 0
    for x in a:
        while x % 2 == 0:
            count += 1
            x = x // 2
    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import deque
import sys
import math

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [int(input_raw[0])]
    input_raw = read_func().strip().split()
    s = 0
    for i in range(N):
        a = (int(input_raw[i]))
        while 1:
            if a % 2 == 0:
                s += 1
                a /= 2
            else:
                break
    print s



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a_l = list(map(int,input().split()))
co = 0

for i in range(n):
    while(True):

        if a_l[i]%2 == 0:
            co = co + 1
            a_l[i] = a_l[i]/2
        else:
            break

print(co)

Submission status: Accepted

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

for j in range(0,N):
    while a[j]%2 == 0:
        a[j] = a[j] / 2
        co = co + 1

print(co)

Submission status: Accepted

Solution code:
n = int(input())
f = lambda x: 0 if x % 2 > 0 else 1 + f(x // 2)
print(sum(f(int(x)) for x in input().split()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
def foo(x):
    ans = 0
    while x%2 == 0:
        x = x//2
        ans += 1
    return ans
print(sum(foo(ai) for ai in a))

Submission status: Accepted

Solution code:
N = int(input())

inp = input().split()

for i in range(N):
    inp[i] = int(inp[i])

count = 0

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

print(count)

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

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

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

print(t)

Submission status: Accepted

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

aa = [str(bin(aa))[::-1].find('1') for aa in A]

print(sum(aa))

Submission status: Accepted

Solution code:
N = int(input())
a = [int(w) for w in input().split()]
if len(a) != N: raise

def factorizeByTwo(n):
    e = 0
    while n > 0 and n % 2 == 0:
        n //= 2
        e += 1
    return e

print(sum(map(factorizeByTwo, a)))

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:
        k += 1
        a[i] = a[i]//2

print(k)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 16 20:49:48 2018
ABC100C
@author: maezawa
"""

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def m():
    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
    return ans

print(m())

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:
n = int(input())
a = list(map(int, input().split()))
b = []
cnt = 0

for x in a:
    if x % 2 == 0:
        b.append(x)

for j in range(len(b)):
    while(b[j] % 2 == 0):
        cnt += 1
        b[j] /= 2

print(cnt)

Submission status: Accepted

Solution code:
def cout(num, d):
    if num%2==0:
        return d+1
    else:
        return d
count=0

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

for i in A:

    j = i
    while j%2==0:
        count = cout(j,count)
        j=j/2

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
list=input().rstrip().split() 
a=[ int(list[j]) for j in range(len(list))]
counter=0
for j in range(N):
    while( a[j]%2==0):
        counter+=1
        a[j]=a[j]//2
print(counter)

Submission status: Accepted

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

odd_num = 0
for A_i in A:
    tmp_odd_num = 0
    while A_i % 2 == 0:
        A_i //= 2
        tmp_odd_num += 1
    odd_num += tmp_odd_num

print(odd_num)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest


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

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

    print(count)

Submission status: Accepted

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

print(maxi)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())						# 5
a = list( map(int, input().split()) )	# 1 2 3 4 5 ...

ans=0
for i in a:
	b = True
	while b:
		if (i//2)==(i/2):
			ans+=1
			i = i//2
		else:
			b=False
			
print(ans)

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

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

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

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())
a = [int(x) for x in stdin.readline().rstrip().split()]

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

count = 0

for i in range(N):
    tmp = Base_10_to_n(a[i], 2)[::-1]
    for j in range(len(tmp)):
        if tmp[j] == '0':
            count += 1
        else:
            break

print(count)

Submission status: Accepted

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

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

print(int(count))

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
num = input().split()

k = 0

for i in num:
  n = int(i)
  while(True):
    if n % 2 == 0:
      n /= 2
      k += 1
    else:
      break
      
print(k)

Submission status: Accepted

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

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

    print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def b(c):
    i = 0
    while c%2 == 0:
        c = c//2
        i += 1
    return i

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

Submission status: Accepted

Solution code:
b = input()
l = input().split()
a = 1
r = 0
for i in range(len(l)):
    a = int(l[i])
    while(a%2 == 0):
        a /= 2
        r += 1
print(r)

Submission status: Accepted

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

print(res)

Submission status: Accepted

Solution code:

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

sum_count = 0

for a_i in a:
    while 1:
        a_i = a_i / 2
        if a_i.is_integer():
            sum_count += 1
            continue
        else:
            break

print(sum_count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from math import sqrt
from collections import defaultdict
def getCount(i):
    c = 0
    while i > 0:
        if i%2 == 0:
            c += 1
        else:
            break
        i//=2
    return c
n = int(input())
arr = [int(x) for x in input().split()]
count = 0
for i in arr:
    count += getCount(i)
print(count)

Submission status: Accepted

Solution code:
N = int(input())

arr = input().split()

for i in range(N):
    arr[i] = int(arr[i])

cnt = 0

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    N = input()
    a = input().split()

    a = list(map(int,a))

    ans = 0

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

    print(ans)


if __name__ == "__main__":
        main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

total = 0
for i in A:
    counter = 0
    if i % 2 == 0:
        tmp = i
        while tmp % 2 == 0:
            tmp /= 2
            counter += 1
    total += counter
print(total)

Submission status: Accepted

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

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


ans=0

for i in a:
	ans+=yakusu(i)

print ans

Submission status: Accepted

Solution code:
def main():
    N = input()
    l = map(int, raw_input().split())
    result = 0
    for i in range(N):
        while l[i]%2 == 0:
            l[i] = l[i]/2
            result = result + 1
    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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


def num_of_two(number):
    ans = 0
    while number % 2 == 0:
        ans += 1
        number /= 2
    return ans

ans = 0
for num in a:
    ans += num_of_two(num)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(sum(map(func, a)))

Submission status: Accepted

Solution code:
from math import *
n=int(input())
a=list(map(int,input().split()))
a.sort()
opr=0
for i in range(n-1,-1,-1):
	if(a[i]%2==0):
		k=bin(a[i])[2:]
		for j in range(len(k)-1,-1,-1):
			if(k[j]=='0'):
				opr+=1
			else:
				break
print(opr)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
line=input()
line=line.rstrip().split(" ")

list1=[]
for i in range(N):
    list1.append(int(line[i]))

count=0
i=0
for i in range(N):
    
    j=0
    for j in range(50):
        if list1[i]%2==0:
            count=count+1
            list1[i]=int(list1[i]/2)
        else:
            break
        
print(count)

Submission status: Accepted

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


def count(num):
    _num = num
    count = 0
    while _num / 2 >= 1 and _num % 2 == 0:
        _num = _num // 2
        count += 1
    return count


cnt_list = [count(a) for a in a_list]
cnt = sum(cnt_list)

print(cnt)

Submission status: Accepted

Solution code:
from math import log

n = int(input())
aaa = list(map(int, input().split()))
ans = 0
for a in aaa:
    ans += log(a & -a, 2)
print(int(ans))

Submission status: Accepted

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

x = 0

for n in range(N):
    a = li.pop()
    while a%2 == 0:
        x = x+1
        a = int(a/2)

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

def checkhalf(n,i,flg):
    if n%2 ==0:
        return n/2,i+1,True
    else:
        return n,i,False

ans = 0
for a in A:
    n = a
    i = 0 
    flg = True
    while flg:
        n,i,flg = checkhalf(n,i,flg)
    ans = ans + i

print(ans)

Submission status: Accepted

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

result = 0
for i in range(n):
  temp = a[i]
  for j in range(a[i]):
    if temp % 2 == 0:
      temp //= 2
      result += 1
    else:
      break

print(result)

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

Submission status: Accepted

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

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

    print(t)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

ans = 0

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

print(ans)

Submission status: Accepted

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

##  NG
##  すべて3倍
##  2で割ってよいのは偶数だけ
if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
num_array = int(input())
array = list(map(int, input().split(' ')))
result = 0;
for i in array:
    while not i==0:
        if i%2==0:
            i = i//2
            result += 1
        else:
            break
print(result)

Submission status: Accepted

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

def warizan(num):
    counter = 0
    while(num % 2 == 0):
        num = num / 2
        counter += 1
    return counter


_a = list(map(warizan,a))
print(sum(_a))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import functools
N = int(input())
A = [int(x) for x in input().split()]
P = functools.reduce(lambda a,b: a*b, A)
print(len(bin(P).split('1')[-1]))

Submission status: Accepted

Solution code:
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n = I()
a_ = Is()
c = 0
for e in a_:
    t = e
    while t > 1 and t/2 == t//2:
        c += 1
        t = t//2
print(c)

Submission status: Accepted

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

ans = 0
for num in num_list:
	while num%2 == 0:
		ans += 1
		num/=2
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A_N=list(map(int, input().split()))
c_sum = 0
for a_i in A_N:
    c = 0
    while True:
        if a_i %2 == 0:
            a_i /= 2
            c += 1
        else:
            break
    c_sum += c
print(c_sum)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import numpy as np


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

N = int(input())

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

sum = 0
for aa in a:
    sum += count_2(aa)

print(sum)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

count = 0
while len(a_arr) > 0:
    a_arr = list(map(lambda x : x / 2, filter(lambda x : x % 2 == 0, a_arr)))
    count += len(a_arr)

print(count)

Submission status: Accepted

Solution code:
import math
N = int(input())
a = [int(num) for num in input().split()]
count = 0

for i in range(N):
    count += bin(a[i])[::-1].index("1")

print(count)

Submission status: Accepted

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

Submission status: Accepted

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


def count(n):
    """
    >>> count(10)
    1
    >>> count(96)
    5
    """
    c = 0
    while n % 2 == 0:
        n //= 2
        c += 1
    return c


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

print(s)

Submission status: Accepted

Solution code:
N=int(input())
Prog=map(int,input().split())
c=0
for i in Prog:
    tmp=i
    while tmp%2==0:
        c+=1
        tmp=tmp/2

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
a = [int(i) for i in input().split()]
def times(n):
  if n%2==1:
    return 0
  else:
    return 1+times(n/2)
b = [times(n) for n in a]
ans =sum(b)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

arr = map(int,raw_input().split())

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

print count

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def Pow2(x):
    if x%2==0:
        return Pow2(x//2)+1
    else:
        return 0

N = int(input())
a = input().split()
ans = 0
for i in range(N):
    ans += Pow2(int(a[i]))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def f(n):
    r=0
    while True:
        if n%2!=0:
            break
        n//=2
        r+=1
    return r

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

Submission status: Accepted

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


def aaa(n):
    count = 0
    while n%1 == 0:
        n /= 2
        count +=1
    return count -1

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

Submission status: Accepted

Solution code:
n = int(input())
arr = [int(a) for a in input().split()]

res = 0
for e in arr:
    tmp = e
    while True:
        if tmp % 2 == 0:
            res += 1
            tmp = tmp / 2
        else:
            break
print(res)

Submission status: Accepted

Solution code:
N = int(input())

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

cc = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, A):
    ans = 0
    for a in A:
        while a % 2 == 0:
            a //= 2
            ans += 1

    return ans


def main():
    N = read_int()
    A = read_int_n()
    print(slv(N, A))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0

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

print ans

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def num_of_division_by_2(num):
    # O(log(num))
    count = 0
    current_num = num
    while current_num % 2 == 0:
        current_num //= 2
        count += 1
    return count

N = int(input())
a_list = [int(elem) for elem in input().split(' ')]
assert len(a_list) == N

total_num_division = 0
for a in a_list:
    total_num_division += num_of_division_by_2(a)

print(total_num_division)

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

Submission status: Accepted

Solution code:
n = int(input())
xs = [int(x) for x in input().split()]

def div2(x):
    while x % 2 == 0:
        x /= 2
        yield 1

print(sum(sum(div2(x)) for x in xs))

Submission status: Accepted

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

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

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

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

print(count)

Submission status: Accepted

Solution code:
n = int(input())
x = [int(i) for i in input().split()]
ans = 0
for i in x:
	num = 0
	while i%(2**num)==0:  num+=1
	ans += num
print(ans-n)

Submission status: Accepted

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


def div2count(num):
    ret = 0
    while num % 2 == 0:
        ret += 1
        num = num // 2
    return ret


print(sum(map(div2count, a)))

Submission status: Accepted

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

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