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

print(count)

Submission status: Accepted

Solution code:
from sys import stdin
N = int(input())
a = [int(x) for x in stdin.readline().rstrip().split()]
ans = 0
for i in range(N):
    while a[i]%2 != 1:
        a[i] = a[i]/2
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def num2(n: int) -> int:
    """n を素因数分解した時の 2 の指数
    """
    s = 0
    while n % 2 == 0:
        s += 1
        n //= 2
    return s


def multiple3_or_divide2(N: int, A: list) -> int:
    return sum(num2(a) for a in A)


if __name__ == "__main__":
    N = int(input())
    A = [int(s) for s in input().split()]
    ans = multiple3_or_divide2(N, A)
    print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a_array = [int(x) if int(x) % 2 == 0 else 1 for x in input().split()]

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0).read().split())
#print(f.reduce(o.mul,a))
a=[s for s in a if s%2==0]
if len(a)==0:
    print(0)
    exit()
count=0

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

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

Submission status: Accepted

Solution code:
import bisect
ans=0

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

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

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
a=np.array(list(map(int,input().split())))

def f(x):
    ret=0
    while(x!=0 and x%2==0):
        ret+=1
        x/=2
    return ret
  
ans=0
for i in a:
    ans+=f(i)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0


def d(ai,ans):
    if ai % 2 != 0:
        return ans
    ans += 1
    return d(ai / 2, ans)


for ai in a:
    ans=d(ai,ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
al = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
for a in al:
    while 1:
        if a%2 == 0:
            count += 1
            if a/2 == 1:
                break
            a = a/2
        else:
            break
print(count)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
mod=[]
cnt=0
for ai in a:
    tmp=ai
    while True:
        if tmp%2==1:
            break
        cnt+=1
        tmp//=2
print(cnt)

Submission status: Accepted

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


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

lis = []

for i in range(N):
    lis.append(dfs(A[i]))

print(sum(lis))

Submission status: Accepted

Solution code:
def f(k):
    c = 0
    while k % 2 == 0:
        k = k // 2
        c += 1
    return c


def main():
    input()
    a = [int(a) for a in input().split()]

    c = 0
    for k in a:
        c += f(k)
    print(c)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
def f(a,c):
    while a%2==0:
        c+=1
        a=int(a/2)
    return c
m=[]
for i in range(n):
    m.append(f(l[i],0))

print(sum(m))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
data = [t.rstrip() for t in sys.stdin.readlines()]

r = [i.split() for i in data]
n = [int(i) for i in r[1]]

ans = 0

#print(n)

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

print(ans)

Submission status: Accepted

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

Ans = []
for i in a:
    count = 0
    while i % 2 == 0:
        i = i//2
        count += 1
    Ans.append(count)

print(sum(Ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(31):
    for temp in a:
        if temp % (2 ** (i + 1)) == 0:
            count+=1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n= int( input())
a = list(map(int, input().split()))

r=0
e=False

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

Submission status: Accepted

Solution code:
N = int(input())

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

m = 0

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

print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def c_time3_or_div2(N, A):
    # Aの各要素aにおける因数2の個数の和
    # aを2進数として下位ビットから見て、最初に1が現れた桁数が因数2の個数
    return sum((bin(a)[::-1].index('1') for a in A))

N = int(input())
A = [int(i) for i in input().split()]
print(c_time3_or_div2(N, A))

Submission status: Accepted

Solution code:
n = int(input())
x = list(map(int, input().split()))
count = 0

for i in range(n):
    test = x[i]
    for j in range(30):
        if test%2 == 0:
            count += 1
            test = int(test/2)
        else:
            break

print(count)

Submission status: Accepted

Solution code:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  A = list(map(int, input().split()))
  count = 0
  for a in A:
    while a % 2 == 0:
      count += 1
      a //= 2
  print(count)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N=int(stdin.readline().rstrip())
data=[int(x) for x in stdin.readline().rstrip().split()]
ans=0
for i in data:
    for j in range(1,1000000001):
        if (i%(2**j))==0:
            ans+=1
        else:
            break
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
def f(i):
    if i==0 or i%2==1:
        return 0
    else:
        return 1+f(i//2)
ans = 0
for a_ in a:
    ans += f(a_)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
memo = {}
def f(i):
    if i in memo.keys():
        return memo[i]
    if i==0 or i%2==1:
        return 0
    else:
        memo[i] = 1+f(i//2)
        return memo[i]
ans = 0
for a_ in a:
    ans += f(a_)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
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:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N = int(lines.pop(0))
    A = list(map(int, lines.pop(0).split(' ')))
    res = 0
    for n in A:
        while( n % 2 == 0 ):
            n = int(n / 2)
            res += 1

    print(res)
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Accepted

Solution code:
# C
n = int(input()) 
a = list(map(int, input().split()))
count = 0
for value in a:
    while True:
        if value % 2 == 0:
            count += 1
            value /= 2
            continue
        else:
            break
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
class Solver(object):
    def __init__(self):
        self.n = int(input())
        self.a_s = list(map(int, input().split(" ")))
        self._evens = None

    def solve_archive(self):
        if len(self.evens) == 0:
            return 0
        number = min(self.evens)

    def solve(self):
        print(sum(map(Solver.count_multiple_of_two, self.a_s)))

    @staticmethod
    def count_multiple_of_two(number):
        counter = 0
        while number % 2 == 0:
            number /= 2
            counter += 1
        return counter

    @property
    def evens(self):
        if self._evens is None:
            self._evens = []
            for a in self.a_s:
                if a % 2 == 0:
                    self._evens.append(a)
        return self._evens


if __name__ == "__main__":
    s = Solver()
    s.solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/mnt/c/Users/moiki/bash/env/bin/python
N = int(input())
A = list(map(int, input().split()))

ans = 0
for a in A:
    if  a % 2 == 0:
        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 a in A:
  #print(format(a,'b')[::-1])
  #print(format(a,'b')[::-1].index('1'))
  cnt += format(a,'b')[::-1].index('1')
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

if cnt == n:
    print(0)
else:
    print(ans)

Submission status: Accepted

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

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

count = 0
for x in aList:
    if x % 2 == 0:
        count += calc(x, 0)

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def div2(num):
    count = 0
    while num % 2 == 0:
        num /= 2
        count += 1
    return count

a_arr2 = [div2(i) for i in a_arr]
print(sum(a_arr2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(N, As):
    def f(n):
        c = 0
        while n % 2 == 0:
            c += 1
            n //= 2
        return c
    return sum([f(a) for a in As])


if __name__ == "__main__":
    N = int(input())
    As = list(map(int, input().split(" ")))
    print(solve(N, As))

Submission status: Accepted

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

Submission status: Accepted

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

def count(number):
    count = 0
    while True:
        if number % 2 == 0:
            number //= 2
            count += 1
        else:
            break
    return count
  
a_2 = [int(i) for i in a if i % 2 == 0]

ans = 0
for i in a_2:
    ans += count(i)
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 = i/2
print(ans)

Submission status: Accepted

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


main()

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:
def main():
    N = int(input())
    an = list(map(int, input().split()))
    ans = 0
    for a in an:
        if a % 2 != 0:
            continue
        while True:
            if a % 2 != 0:
                break
            a //= 2
            ans += 1
    print(ans)


main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

a = sorted(list(filter(lambda x : (x % 2) == 0, a)), reverse=True)
ans = 0
for i in a:
    while i % 2 == 0:
        i //= 2
        ans += 1
print(int(ans))

Submission status: Accepted

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

def ct(n):
    c = 0
    while n % 2 == 0:
        c += 1
        n //= 2
    return c
ans = 0
for x in X:
    ans += ct(x)
    
print(ans)

Submission status: Accepted

Solution code:
N = int(input())


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

print(sum(list(map(lambda x: f(int(x)), input().split()))))

Submission status: Accepted

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

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

ans = 0
for a in A:
    ans += devide2(a)

print(ans)

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

print(ans)

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
a = [int(a) for a in input().strip().split()]

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

ans = 0
for ai in a:
    ans += fac2(ai)

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
A = [int(i) for i 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())
a = list(map(int,input().split()))


def division2(n,count):
  if n%2 == 0:
    count += 1
    return division2(n//2,count)
  else:
    return count

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

x = list( filter(lambda a:a%2==0 ,x) )

#print(x)


ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
# ABC 100
def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def db(x): 
    global debug
    if debug: print(x)
debug = True
N = getInt()
A = getIntList()
def power2(n):
    pw = 0
    while n%2==0:
        pw += 1
        n //= 2
    return pw
count = 0
for i in range(N):
    count += power2(A[i])
print(count)

Submission status: Accepted

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

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

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

    print(k)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for x in range(0,N):
    while A[x] % 2 == 0:
        A[x] = A[x] // 2 
        number += 1

print(number)

Submission status: Accepted

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

p = 0
l2 = []
while 2**p < 1000000000:
  l2.append(2**p)
  p += 1

d = 0
for l in L:
  for i in range(len(l2)-1, -1, -1):
    if l % l2[i] == 0:
      d += i
      break

print(d)

Submission status: Accepted

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

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

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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def even(N):
    if N % 2 == 0:
        return even(N//2) + 1
    else:
        return 0


count = 0
for i in a_l:
    count += even(i)

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(n):
    while A[i] % 2 == 0 and A[i] > 1:
        count += 1
        A[i] //= 2
            
print(count)

Submission status: Accepted

Solution code:
n  = int(input())

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

def get2(x):
    total = 0
    while x % 2 == 0:
        x = x // 2
        total += 1
    return total

total = 0
for x in a:

    total += get2(x)

print(total)

Submission status: Accepted

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

count=0

for i in range(N):
    b=a[i]
    for j in range(1,40):
        if b%(2**j)==0:
            count+=1
        else:
            break

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
print(sum(len(format(a, "b")) - format(a, "b").rfind("1")-1 for a in A))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
    while A[i] % 2 != 1:
        A[i] /= 2
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
a = int(input())
x=list(map(int, input().split()))
s = 0
for i in range(a):
    if x[i]%2==0:
        for j in range(100000):
            x[i] /=2
            s +=1
            if x[i]%2!=0:break
print(int(s))

Submission status: Accepted

Solution code:
N = int(input())
l = list(map(int,input().split()))
ans = 0

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

Submission status: Accepted

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

for i in range(n):
    if A[i] % 2 == 0:
        A2.append(A[i])
        
count = 0
for a in A2:
    while a % 2 == 0:
        a = a // 2
        count += 1
        
print(count)

Submission status: Accepted

Solution code:
N = int(input())

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

r = 0
for aa in a:
  j = 0
  while aa % (2 ** j) == 0:
    j += 1
  r += j-1
print(r)

Submission status: Accepted

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


def main():
    n = int(input())
    aa = map(int, input().split())
    res = sum(map(div2cnt, aa))
    print(res)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

cnt=0
for i in range(N):
    str_b_xi=str(bin(x_list[i]))
    j=-1
    while(str_b_xi[j]=="0"):
        cnt+=1
        j-=1

print(cnt)

Submission status: Accepted

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

def g(x):
    c = 0
    while x % 2 == 0:
        c += 1
        x = x/2
    return (c)
ans = 0
for i in range(N):
    ans += g(a[i])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

co = 0
for i in l:
    while i % 2 == 0:
        i /= 2
        co += 1
print(co)

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:
def exp2(n):
    if n%2 == 0: return 1 + exp2(n//2)
    else: return 0
n = int(input())
a = list(map(int, input().split()))
b = list(map(exp2, a))
print(sum(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!=1:
    a[i]=a[i]//2
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
divide_dict = {0:1,2:1,4:2,6:1,8:3}
array = [int(x) for x in input().split()]
res = 0
for num in array:
    if num % 2 != 0:
        continue
    else:
        while num % 2 == 0:
            res += 1
            num /= 2
print(res)

Submission status: Accepted

Solution code:
a = int(input())
Ar = list(map(int, input().split()))
Br = []
for r in Ar:
  if r % 2 == 0:
    Br.append(r)
cnt = 0
for r in Br:
  while r % 2 != 1:
    r /= 2
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
ar = list(map(int,input().split(" ")))
br = []
for r in ar:
    if r % 2 == 0:
        br.append(r)
count = 0
for r in br:
    while r % 2 != 1:
        r /= 2
        count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(even_sum)

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

Submission status: Accepted

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

Submission status: Accepted

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


abc100_c()