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:
# https://atcoder.jp/contests/abc100/tasks/abc100_c
# C - *3 or /2

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

# 2で割れる数は何回か
def f(value):
    x = value
    count = 0
    while x % 2 == 0:
        x = x / 2
        count += 1
    return count

ans = sum([f(a) for a in a_list])
print(int(ans))

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().split()]
i = 0
ans = 0
while 1:
    if i >= N:
        break
    if A[i] % 2:
        i += 1
        continue

    A[i] = A[i] // 2
    ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def solve():
    n = int(input())
    a = list(map(int, input().split()))
    return sum([count(ai) for ai in a if ai % 2 == 0])


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


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 100, c
def prime2(x):
    count = 0
    while (x/2).is_integer():
        count += 1
        x = x/2
        if x == 1:
            break
    return(count)


n = int(input())
A = [int(el) for el in input().split(' ')]
count2 = 0
for a in A:
    count2 += prime2(a)
print(count2)

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

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

Submission status: Accepted

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

# 約数に2がどれだけ含まれているのかを調べる。
count = 0

for i in range(N):
  # print (i, a[i])
  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()))
c = 0
for a in A:
    while a % 2 == 0:
        a = a/2
        c += 1
print(c)

Submission status: Accepted

Solution code:
n = int(input())
a = list(filter(lambda x: x % 2 == 0, map(int, input().split())))
ans = 0
while len(a) != 0:
    ans += len(a)
    a = list(filter(lambda x: x % 2 == 0, map(lambda x: x / 2, a)))
print(ans)

Submission status: Accepted

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


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

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(N):
    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 = list(map(int,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
N = int(input())
a = [int(i) for i in input().split()]
ans=0
for i in range(len(a)):
	zyou = 1
	for g in range(1145148101919):
		if a[i]%2**zyou==0:
			ans+=1
			zyou+=1
		else:
			break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt=0

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

Submission status: Accepted

Solution code:
import itertools
import collections

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

n = getint()
a = getints()

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

res = 0
for d in a:
    res += cnt(d)

print(res)

Submission status: Accepted

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

even = [x for x in a if x % 2 == 0]

ans = 0
for e in even:
    while True:
        if e / 2 != e // 2:
            break
        e /= 2
        ans += 1
        if e == 1:
            break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

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

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
cnt=0
a=list(map(int,input().split()))
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 math

n = int(input())
li = [int(x) for x in input().split()]
ans = 0
isAvailable = False
for a in li:
    if a % 2 == 0:
        isAvailable = True
        while(a % 2 == 0):
            a /= 2
            ans += 1
if isAvailable:
    print(ans)
else:
    print(0)

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int,input().split()))
cnt = 0
i = 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 = [int(i) for i in input().split()]
c = 0
ans = 0
for i in a:
    while i%2 == 0:
        i = i//2
        c += 1
print(c)

Submission status: Accepted

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

sum=0

for item in l:
  while True:
    if item%2==1:
      break
    else:
      item=item/2
      sum+=1
      
print(sum)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in input().split()]
def b(x):
  k=0
  while x&1 == 0:
    x>>=1
    k+=1
  return k
c=sum([b(i) for i in a])
print(c)

Submission status: Accepted

Solution code:
input()

c = 0
for n in [int(x) for x in input().split(' ') if int(x) % 2 == 0]:
    while n % 2 == 0:
        n /= 2
        c += 1

print(c)

Submission status: Accepted

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

def power_two_divisor(N):
    for i in range(30, -1, -1):
        if N % (2 ** i) == 0:
            return i
        
ans = 0
for e in a:
    ans += power_two_divisor(e)
    
print(ans)

Submission status: Accepted

Solution code:
def factorize2(n):
    """
    nの値を素因数分解し、素因数とその指数をtupleにまとめたリストを返す
    e.g.
    >>> factorize(20)
    [(2, 2), (5, 1)]
    """
    b = 2
    fct = []
    while b == 2:
        cnt = 0
        while n % b == 0:
            cnt += 1
            n //= b
        if cnt > 0:
            fct.append((b, cnt))
        b += 1
    if n > 1:
        fct.append((n, 1))
    return fct


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

cnt = 0
for a in A:
    res = factorize2(a)
    if len(res) > 0:
        fct, num = res[0]
        if fct == 2:
            cnt += num
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

r = 0
for i in l:
  c = 0
  while i % 2 == 0:
    c += 1
    i /= 2
  r += c

print(r)

Submission status: Accepted

Solution code:
def c(x):
	a=0
	while x%2==0:
		a+=1;x//=2
	return a
n=input()
print(sum(c(int(i))for i in input().split()))

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int, input().split()))
c = 0
for i in b:
    while True:
        if i % 2 == 0:
            c += 1
            i //= 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):
  ans += len(bin(a[i])) - bin(a[i]).rfind("1") -1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

processing = True
result = 0
while processing:
    processing = False
    for i in range(0,N):
        if a_list[i] % 2 == 0:
            a_list[i] = a_list[i] // 2
            processing = True
            result += 1

print(result)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 考察微塵もしてないけど2の約数の数っぽい

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

def cnt(m):
	count = 0
	while m % 2 == 0:
		count += 1
		m //= 2
	return(count)

ans = 0
for i in range(N):
	ans += cnt(X[i])

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))
li = [x for x in li if x%2 ==0]

li2 = []
for i in range(len(li)):
    num = 0
    
    while li[i]%2 == 0:
        li[i] = li[i]/2
        
        num += 1
    li2.append(num)
print(sum(li2))

Submission status: Accepted

Solution code:
N = int(input())

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    if a <= 8 and b <= 8:
        print("Yay!")
    else:
        print(":(")
    return

#B
def B():
    d, n = LI()
    print(str(n * (n != 100) or n + 1) + "00" * d)
    return

#C
def C():
    II()
    ans = 0
    a = LI()
    for ai in a:
        while not ai % 2:
            ans += 1
            ai = ai // 2
    print(ans)
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    C()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
count=0
for i in range(n):
    if a[i]%2==0:
        for j in range(10000):
            if a[i]%2**(j+1)==0:
                count+=1
            else:
                break
        

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))
cnt = 0
for i in range(n):
  tmp = bin(li[i])
  cnt += len(tmp) - tmp.rfind("1") - 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
A = [i for i in A if i % 2 == 0]
c = 0
while len(A) != 0:
    for i in range(len(A)):
        A[i] = A[i] // 2
        c += 1
    A = list(filter(lambda x: x%2==0, A))
print(c)

Submission status: Accepted

Solution code:
n = int(input())
aa = list(map(int, input().split()))
ans = 0
for a in aa:
    cnt = 0
    while not a & 1:
        a >>= 1
        cnt += 1
    ans += cnt
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
aa=list(map(int,input().split()))
ans=0
for a in aa:
    s=format(a,"b")
    ans+=len(s)-s.rfind("1")-1
print(ans)

Submission status: Accepted

Solution code:
def gu(x):
    counter = 0
    while x % 2 == 0 and x != 0:
        x /= 2
        counter += 1
    return counter


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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from copy import *
from sys import *
from math import *
import queue
from collections import defaultdict,Counter,deque

setrecursionlimit(1000000)

#location: w,hで記載
def main():
	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)

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(m,n):
	x = max(m,n)
	y = min(m,n)
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	return y

class Queue():
	#競プロ用のQueue
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)

class Stack():
	#怯プロ用のStack
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)

main()

Submission status: Accepted

Solution code:
N = int(input())
a = list(map(int, input().split()))
ans = 0
for x in a:
    while(True):
        if x & 1:
            break
        x >>= 1
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#ABC089C
import sys

def checkx(i):
	t=0
	while(1):
		if(i%2==0):
			t+=1
			i=i//2
		else:
			return t

n = int(input())
tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))

sum = 0
for i in range(0,n):
	sum+=checkx(hoge[i])
print(sum)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

sum_div = 0
for i in range(N):
  temp_div = A[i]
  while True:
    if temp_div%2 == 0:
      sum_div += 1
      temp_div = temp_div//2
    else:
      break
print(sum_div)

Submission status: Accepted

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

'''
b = 0
c = 0
cnt = 0
flag = False
while True:
    b = 0
    c = 0
    for i in range(n):
        if a[i] % 2 == 0 and c == 0:
            a[i] /= 2
            c += 1
        else:
            b += 1
    #print(a,b)
    if b != n:
        cnt += 1
    else:
        break
'''
b = [0] * n
for i in range(n):
    while True:
        if a[i] % 2 == 0:
            a[i] /= 2
            b[i] += 1
        else:
            break

print(sum(b))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 2019/07/19

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

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

Submission status: Accepted

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

even = [A[i] for i in range(N) if A[i]%2==0]

cnt = 0
for e in even:
    while e%2==0:
        e//=2
        cnt+=1
        
print(cnt)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
from functools import reduce
from operator import mul

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import os, sys, re, math

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


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

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:
import math
n = int(input())
A = [int(s) for s in input().split()]
i = 0
flag = 0
count = 0
sum = 0


def bynum(x):
  count = 0
  while True:
    if x % 2 == 0:
      x = x / 2
      count += 1
    else:
      return count

for a in A:
  sum += bynum(a)

print(sum)


    



"""
while i < len(A):
  if A[i] %2 == 0:
    flag = 0
    A[i] = A[i] /2
    count += 1
    i = 0
    
    continue
  else:
    flag += 1
    if flag == len(A):
      print(count)
      exit()
    i += 1
  """

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import os, sys, re, math

lines = sys.stdin.readlines()

n = lines[0]
aa = lines[1].split()

result = 0
n = int(n)
for a in aa:
    a = int(a)
    while (a % 2 == 0):
        a /= 2
        result += 1

print (result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

nums = list(map(int, input().split(' ')))


cnt = 0

for n in nums:
    c = 0
    while n%2 == 0:
        c += 1
        n = n//2
    cnt += c

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = int(input())
    a = list(int(_) for _ in input().split())
    cnt = 0
    for i in range(N):
        tmp = float(a[i])
        while tmp > 0 and tmp.is_integer():
            if tmp%2 == 1:
                break
            tmp = tmp / 2
            cnt += 1
    print(cnt)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

N, = map(int, input().split())
L = [int(v) for v in input().split()]

ans = 0
for v in L:
    while v % 2 == 0:
        ans += 1
        v = v // 2
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
da=list(map(int,input().split()))
ans=0
co=0
while co<n:
  if da[co]%2:
    co+=1
  else:
    ans+=1
    da[co]/=2
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = 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:
import bisect
import heapq
import itertools
import math
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

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

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

Submission status: Accepted

Solution code:
import time
import sys
sys.setrecursionlimit(10000)


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

start = time.time()

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

print(ans)

elapsed_time = time.time() - start
#print ("{:.2f}".format(elapsed_time * 1000) + " [msec]")

Submission status: Accepted

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

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

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:
#coding: utf-8
N = int(input())
L = list(map(int, input().split()))

cnt = 0
tri_cnt = 0
mem = 0

#全てが奇数になるまで実行し続ける
while(mem != len(L)):
    if(L[mem]%2 != 0):
        mem += 1
    else:
        L[mem] //= 2
        # for i in range(len(L)):
        #     if(i != mem):
        #         L[i] = L[i] * 3
        #         print('',end='')
        cnt += 1

    # tri_cnt = 0
    # for i in range(len(L)):
    #     if (L[i] % 2 != 0):
    #         tri_cnt += 1
else:
    print(cnt)