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

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

print(sum(count2(a) for a in A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b=[]
for i in range(1,30):
    b.append(2**i)
#print(b)
ans=0
u=len(b)
for i in range(n):
    for j in range(u):
        if a[i]%b[j]==0:
            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):
    count = 0
    while a[i] % 2 == 0:
        count += 1
        a[i] /= 2
    ans += count
print(ans)

Submission status: Accepted

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

score = 0
for a in list_a:
    while 1:
        if a % 2 == 0:
            score += 1
            a = a/2
        else:
            break
            
print(score)

Submission status: Accepted

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

cnt = 0

for i in range(N):
    x = 1
    while True:
        if a[i] % 2**x:
            cnt += x - 1
            break
        x += 1

print(cnt)

Submission status: Accepted

Solution code:
N = int(input())
A = list(filter(lambda x: x % 2 == 0, map(int, input().split())))

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    def count_div_by2(num):
        cnt = 0
        while num%2 == 0:
            cnt += 1
            num //= 2
        return cnt
    print(sum(count_div_by2(n) for n in A))
if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def hoge(num):
  for i in range(10**10):
    if(num % (2 ** i) != 0):
      return i - 1
    
n = int(input())
print(sum(list(map(lambda x: hoge(int(x)), input().split()))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
box=list(map(int,input().split()))
count=0
for i in box:
    while i%2!=1:
        i /=2
        count +=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 = x//2
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

counter = 0
for i in range(n):
  for j in range(10000):
    if A[i] % 2 == 0:
      counter += 1
      A[i] //= 2
    else:
      break
print(counter)

Submission status: Accepted

Solution code:
n = int(input())

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

print(x)

Submission status: Accepted

Solution code:
def count_divide(n):
  count = 0
  while n%2 !=1 :
    n = n//2 
    count += 1  
  return count

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

print(sum([count_divide(ai) for ai in a]))

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

c=0
for i in a:
    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()))
for i in range(N):
  for j in range(1,31):
    if a[i]%(2**j)!=0:
      a[i]=j-1
      break
print(sum(a))

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0
for a_i in a:
    mod = 0
    while 0 == mod:
        mod = a_i % 2
        if 0 == mod:
            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(N):
    while True:
        if A[i] % 2 == 0:
            ans += 1
            A[i] = A[i] // 2
        else:
            break
print(ans)

Submission status: Accepted

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

for i in range(n):
  tmp = a[i]
  for j in range(99**99):
    if tmp % 2 == 0:
      cnt += 1
      tmp //= 2
    else:
      break
      
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

def devide(x):
    count = 0
    if x % 2 == 0:
        count += 1 + devide(x//2)
    return count
print(sum(devide(x) for x in A))

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from functools import reduce



INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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


n = I()

ans = 0
for i in LI():
    ans += D(i)



print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce
input()
print(format(reduce(lambda x, y: x*y, (map(int, input().split()))), "b")[::-1].find("1"))

Submission status: Accepted

Solution code:
# ABC100C - *3 or /2
def main():
    N, *A = map(int, open(0).read().split())
    ans = sum(bin(i)[::-1].index("1") for i in A)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

res = 0

for a in arr:
    while a > 1:
        if a % 2 == 0:
            res += 1
            a //= 2
        else:
            break

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#100c
def check_number_of_devide_by_2(n):
#aiが最大1000000000なので、log_2(1000000000) =　29.897352854　回のループで1つのaiを調べられる。
    count = 0
    while n%2==0:
        count += 1
        n = n/2
    
    return count

N = int(input())

list_a = [check_number_of_devide_by_2(i) for i in list(map(int, input().split()))]
#N<=10000 と check～の ループ数より十分間に合う。

print(sum(list_a))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ls = list(map(int, input().split()))
counts = []
for x in ls:
    y = x
    count = 0
    while True:
        if y % 2 == 0:
            y //= 2
            count += 1
        else:
            counts.append(count)
            break
print(sum(counts))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(aCnt)

Submission status: Accepted

Solution code:
import math

n = int(input())
a = sorted(list(map(int, input().split())))
aMax, aNum, aMaxSum = 0, 0, 0

for i in range(n):
    aNum, aCnt = a[i], 0
    while aNum % 2 == 0 and aNum / 2 == aNum // 2:
        aCnt += 1
        aNum /= 2
    aMaxSum += aCnt

print(aMaxSum)

Submission status: Accepted

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

    ans+=c
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
"""
一番大きい偶数を2で割る
それ以外は3倍
を繰り返す
奇数だけになったら終了
↓
各項が2で何回われるか の合計
"""
for i in range(n):
    cnt = 0
    tmp = a[i]
    while tmp % 2 == 0:
        tmp = tmp // 2
        cnt += 1
    ans += cnt
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0
"""
一番大きい偶数を2で割る
それ以外は3倍
を繰り返す
奇数だけになったら終了
↓
各項が2で何回われるか の合計
"""
for i in range(n):
    cnt = 0
    tmp = a[i]
    while True:
        if tmp % 2 == 0:
            tmp = tmp // 2
            cnt += 1
        else:
            break
    ans += cnt
print(ans)

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
def resolve():
    n = int(input())
    aaa = list(map(int, input().split()))
    ans = 0
    for i in range(n):
        temp = aaa[i]
        if temp % 2 != 0:
            continue
        else:
            count = 1
            for j in range(10**9):
                temp = temp / 2
                if temp % 2 != 0:
                    ans += count
                    break
                count += 1            
    print(int(ans))
resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(sum([checkIncludeNum2(i) for i in A]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

l = [int(i) for i in input().split()]
ct = 0

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

for i in s:
    count = format(i, 'b')[::-1].find('1') + count

print(count)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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
def f(n):
  ans=0
  while n%2==0:
    n=int(n/2)
    ans+=1
  return ans
List=[]
for i in range(N):
  if a[i]%2==1:
    pass
  else:
    List.append(a[i])
if len(List)==0:
  print(0)
else:
  for i in range(len(List)):
    ans+=f(List[i])
  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())
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 a in A:
    tmp = 1
    while(a > tmp):
        tmp = tmp << 1
        if a % tmp == 0:
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC100 C - *3 or /2
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
    x = 0
    t = 0
    x = A[i]
    while x%2==0:
        x = x//2
        t += 1
    ans += t
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
from functools import reduce
import copy
import math


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    A = string_to_int(inputs[0])
    odds = []

    for a in A:
        if a % 2 == 0:
            odds.append(a)
    count = 0
    for o in odds:
        while o % 2 != 1:
            o /= 2
            count += 1

    return count


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

Solution code:
def factors(num, factor):
  count = 0
  while num % factor == 0:
    count += 1
    num //= factor
  return count

input()
print(sum(factors(int(tok), 2) for tok in input().split()))

Submission status: Accepted

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

ops = 0

for x in v:
    while x % 2 == 0:
        ops += 1
        x /= 2

print(ops)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    count = 0
    for i in range(N):
        while not a[i]&1:
            count += 1
            a[i] >>= 1
    print(count)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
from collections import  Counter
import statistics
import math
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
aaa = na()
ct = 0
for i in range(n):
    while True:
        if aaa[i] % 2 == 0:
            aaa[i] //= 2
            ct += 1
        else:
            break
print(ct)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

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


print(cnt)

Submission status: Accepted

Solution code:
input()
a = input().split(' ')

ans = 0
for ax in a:
    ax = int(ax)
    while ax % 2 == 0:
        ax //= 2
        ans += 1

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

def is_even(x):
    return x % 2 == 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))

#################

N = I()
a = III()

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

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

ans = 0

for i in A:
    ans += foo(i)

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

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

def div_num(x):
    cnt = 0
    while x > 0:
        if x % 2 == 0:
            cnt += 1
            x //= 2
        else:
            break
    return cnt

print(sum([div_num(x)  for x in L]))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def decompose_by_2(n):
    cnt = 0
    while True:
        if n % 2 == 1:
            return cnt
        n = n / 2
        cnt += 1
        
_ = input()
A = list(map(int, input().split()))
cnt = 0
for a in A:
    cnt += decompose_by_2(a)
    
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:
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    count = 0
    for a in A:
        while a > 0 and a % 2 == 0:
            count += 1
            a = a // 2
    return count


if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
n=int(input())
a=[int(i) for i in 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:
def two(a):
    cnt = 0
    while a % 2 == 0:
        a /= 2
        cnt += 1
    return cnt

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

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

Submission status: Accepted

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

counter = 0

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

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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