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: Runtime Error

Solution code:
from functools import reduce
from operator import mul

def two(a,ans):
    if a%2==0:
        return two(a//2,ans+1)
    else:
        return ans

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

ans1=0
ans2=0
p=reduce(mul,A)
ans1=two(p,ans1)
for i in range(N):
    ans2=two(A[i],ans2)
print(ans2)

Submission status: Runtime Error

Solution code:
import numpy as np
n=int(input())
a=list(map(int,input().split()))
a1=[i for i in a if i % 2 == 0]
a1=np.array(a1)
p=np.prod(a1, axis = 0)
k=0
while True:
    if p%2==0:k+=1
    else:break
print(k)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
a1=[i for i in a if i % 2 == 0]
a1=np.array(a1)
p=np.prod(a1, axis = 0)
k=0
while True:
    if p%2==0:k+=1
    else:break
print(k)

Submission status: Runtime Error

Solution code:
d,n=map(int,input().split())
print((n+n//100)*(100**d))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
cnt=10**9
for i in range(n):
  k=0
  while (a-1):
    if a%2==0:
      a=a//2
      k+=1
    else:break
  cnt=min(cnt,k)    
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
A=list(map(int,input().split()))
cnt=0
if any(A%2==0):
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()) 
dd=[]                                                                  
for i in l: 
	if i % 2==0: 
		dd.append(i)       
cnt_lst=[]                                                             
for i in dd: 
	cnt1=0 
	while(i % 2==0): 
		i//= 2 
		cnt1+=1 
		if i %2==1: 
			cnt=cnt1 
			cnt_lst.append(cnt)             
			break 
print(sum(cnt_lst))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a.sort(reverse=True)
even = []
for i in range(n):
    if a[i] % 2 == 0:
        even.append(a[i])

three = 0
for i in range(len(even)):
    sub = even[i] * (3 ** three)
    while sub % 2 == 0:
        three += 1
        sub = sub / 2

print(three)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
L = [i for i in map(int,input().split()) if i%2 == 0]
even = 1
res = 0
for i in range(len(L)):
  even *= L[i]
while even != 0 and even % 2 == 0:
  even /= 2 
  res += 1
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import collections
import numpy as np

def prime_factorize(n):
    a = []
    if n%2 ==1:
		a=0
      
    while n % 2 == 0:
		a.append(2)
        n //= 2
    return a

N =int(input())

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

ans_array = np.zeros(N)

for i in range(N):
    dummy = prime_factorize(a[i])
  
    ans_array[i] = dummy
ans = int(sum(ans_array))
print(ans)

Submission status: Runtime Error

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

cnt=0
for i in range(n):
    if all([i%2!=0 for i in a])==True: #すべての要素が奇数ならbreak
        break
    elif a[i]%2!=0: #奇数なら3倍
        a[i]*=3
    elif a[i]%4==2: #4の剰余が2（e.g.,2,6,10,...）なら3倍
        a[i]*=3
    elif a[i]%4==0: #4の剰余が0なら1/2倍
        a[i]//=2
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
import math
import copy
import sys
import fractions
import numpy as np
from functools import reduce
import statistics


# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

def gettwice(n):
    counter = 0
    flg = True
    while(flg):
        if n % 2 == 1:
           flg = False
        else:
            n = n/2
            counter+=1

    return counter

n = getInputInt()
data = getInputListInt()

ans = 0
tmpans = 0

oddData = []
evenData = []

for i in range(len(data)):
    if data[i] % 2 == 0:
        evenData.append(data[i])
    else:
        oddData.append((data[i]))

maxOddNum = max(oddData)

for i in range(len(evenData)):
        tmpans += gettwice(evenData[i])

print(tmpans)

Submission status: Runtime Error

Solution code:
import math
import copy
import sys
import fractions
import numpy as np
from functools import reduce
import statistics


# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

def gettwice(n, cnt):
    if n % 2 == 1:
       return cnt

    return gettwice(n/2, cnt+1)

n = getInputInt()
data = getInputListInt()

ans = 0
tmpans = 0

oddData = []
evenData = []

for i in range(len(data)):
    if data[i] % 2 == 0:
        evenData.append(data[i])
    else:
        oddData.append((data[i]))

maxOddNum = max(oddData)

for i in range(len(evenData)):
        tmpans += gettwice(evenData[i], 0)

# counter = 0
# for i in range(int(tmpans)):
#     maxOddNum = maxOddNum * 3
#     if maxOddNum > 1000000000:
#         break
#     counter = i+1

# ans = min(tmpans, counter)

print(tmpans)

Submission status: Runtime Error

Solution code:
sal
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: Runtime Error

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

count = 0
for i in a:
    j = 2
    while i != 0:
        if i % j == 0:
            count += 1
            i //= 2
        else:
            break

print(count)

Submission status: Runtime Error

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

n=int(input())
l=list(map(int,input().split()))
count=0
for i in range(n):
  count+=count(l[i])
print(count)

Submission status: Runtime Error

Solution code:
D, N = map(int,input().split())
if D == 2:
  if N < 100:
    print(N*10000)
  else:
    print(1010000)
elif D == 1:
  if N < 100:
    print(N*100)
  else:
    print(10100)
else:
  if N < 100:
    print(N)
  else:
    print(101)

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
from sympy import factorint

def judge(a):
    primes=factorint(a)
    if 2 in primes.keys():
        return primes[2]
    else:
        return 0

if __name__ == '__main__':
    N=int(input())
    A=list(map(int,input().split()))
    count=0
    for a in A:
        count+=judge(a)

    print(count)

Submission status: Runtime Error

Solution code:
from math import log2

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

res = 0

for l in L:
    while (l % 2 == 0):
        res += 1
        l = l //  2
    
print(res)

Submission status: Runtime Error

Solution code:
import sympy
N=int(input())
L=list(map(int,input().split()))
L_alpha=[sympy.factorint(i) for i in L]
L=[i.get(2) for i in L_alpha]
L=[0 if i==None else i for i in L ]
print(sum(L))

Submission status: Runtime Error

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
def count_2(num):
    count = 0
    while num%2 == 0:
        num /= 2
        pritn(num)
        count += 1
    return count
ans = 0
for i in range(n):
    ans += count_2(a_list[i])
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

n = int(input())
a = list(map, int, input().split())
print(sum((f(ai) for ai in a if ai % 2 == 0)))

Submission status: Runtime Error

Solution code:
n = int(input())
a = [n // 2 for n in map(int, input().split() if n % 2 == 0)]
print(sum(a))

Submission status: Runtime Error

Solution code:
n = int(input())
a = (n // 2 in map(int, input().split() if n % 2 == 0))
print(sum(a))

Submission status: Runtime Error

Solution code:
N=int(input())
count=0
count2=0

nums=[map(int,input().split()) for i in range(N)]

while(1):
  for i in range(N):
    if nums[i]%2==0:
      nums[i]/=2
      count2+=1
    else:
      nums[i]*=3

  if count2==0:
    return count
  else:
    count+=1

Submission status: Runtime Error

Solution code:

if __name__ == '__main__':

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

	cnt = 0
	ODD = []
	EVE = []

	#奇数と偶数に分類
	for i in A:
		if i % 2 == 1:
			ODD.append(i)
		else:
			EVE.append(i)

	while True:

		#全部奇数なら終了
		if len(ODD) == n:
			print(cnt)
			break
		else:
			#奇数は全部３倍する
			for i in range(len(ODD)):
				ODD[i] = ODD[i] * 3

			#偶数はMAX値を２で割る
			#それ以外は３倍する
			chg = False
			mval = max(EVE)
			ind = EVE.index(mval)
			for j in range(len(EVE)):
				if j == ind:
					EVE[j] = int(EVE[j] / 2)
					if ( mval / 2 ) % 2 == 1:
						chg = True
				else:
					EVE[j] = EVE[j] * 3

			#２で割った値が奇数になったらODDに移動
			if chg == True:
				ODD.append(EVE.pop(ind))

			cnt += 1

Submission status: Runtime Error

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

for i in range(n):
    if a[i] % 2 == 1:
        continue

    temp = a[i]
    while temp % 2 == 0:
        temp %= 2
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
v

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(1,x**(0.5)+1):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return list(set(lst))    
for i in range(n):
  y=yakusu(a[i])
  for j in range(len(y)):
    while y[j]%2==0:
      y[j]==y[j]//2
      m+=1
print(m)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(1,x**(0.5)+1):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return list(set(lst))    
for i in range(n):
  for j in range(len(yakusu(a[i]))):
    while (yakusu(a[i]))[j]%2==0:
      (yakusu(a[i]))[j]==(yakusu(a[i]))[j]//2
      m+=1
print(m)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(1,x**(0.5)+1):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in range(len(yakusu(a[i]))):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in range(len(yakusu(a[i]))):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  for j in len(yakusu(a[i])):
    while yakusu(a[i])[j]%2==0:
      yakusu(a[i])[j]==yakusu(a[i])[j]//2
      m+=1
print(m)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=0
def yakusu(x):
  lst=[]
  for i in range(x**(0.5)):
    if x%i==0:
      lst.append(i)
      lst.append(x//i)
  return lst    
for i in range(n):
  Lst=yakusu(a[i])
  for j in len(Lst):
    while a[j]%2==0:
      a[j]==a[j]//2
      m+=1
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 0
while True:
  e_max = max([i for i in a if i % 2 == 0])
  if len(e_max) != 0:
    a = [i / 2 if i == e_max else i * 3 for i in a]
    ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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:
        if not a % 2:
            ans += a // 2
    print(ans)
    return

#D
def D():
    return

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

Submission status: Runtime Error

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

cnt = 0
tri_cnt = 0
mem = 0

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

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

else:
    print(cnt)

Submission status: Runtime Error

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

cnt = 0
tri_cnt = 0

mem = 0

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

else:
    print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
num = 1
ans = 0
for j in range(N):
    num = num*A[j]
while num % 2 == 0:
    ans = ans + 1
    num = num / 2
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
num = 1
ans = 0
for j in A:
    num *= j
while num % 2 == 0:
    ans += 1
    num *= 0.5
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def solve(n,i):
	if n%2!=0:
		return i
	else:
		return(n//2,i+1)

cnt = 0

for i in a:
	cnt +=solve(i,0)

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

count = 0
for num in [a, b, c]:
  while num%2 == 0:
    num = num//2
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
n=int(input())
la=[int(i) for i in input().split()]
la.sort(reverse=True)
ans=-1
t3=0

while t3!=n:
    f=0
    t3=0
    for i in range(n):
        if f==0 and la[i]%2==0:
            la[i]=la[i]/2
            f=1
        else:
            la[i]=la[i]*3
            t3+=1
    ans+=1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = 1
for a in A:
    if a % 2 == 0:
        B *= a
ans = 0
for i in range(100, 0, -1):
    if B % (2**i) == 0:
        ans += i
        B = B / (2**i)
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
l=[]
no_even=0
def no_even(A,N):
    flag=0
    for i in range(N):
        if A[i]%2==0:
            flag=1
            break
    if flag==0:
        return True
    else:
        return False

count=0

while no_even(A,N)==False:
    for i in range(N):
        if A[i]%2==0:
            l.append(A[i])
    flag=0
    for i in range(N):
        if A[i]==max(l) and flag==0:
            A[i]=int(A[i]/2)
            flag=1
        else:
            A[i]*=3
#    print(A)    
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
import operator as o
import functools as f
n,*a=map(int,open(0).read().split())
#print(f.reduce(o.mul,a))
a=[s for s in a if s%2==0]
x=f.reduce(o.mul,a)
count=0
while True:
    if x%2==0:
        x=x//2
        count+=1
    else:
        break
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int,input().split()))
memo = [0 for i in range(1000001)]
def f(i):
    if memo[i]:
        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: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

count = 0
check = True
while check:
    a = sorted(list(filter(lambda x : (x % 2) == 0, a)), reverse=True)
    if a == []:
        check = False
    else:
        a[0] = int(a[0] / 2)
        for i in range(1,len(a)):
            a[i] *= 3
        count += 1
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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
br.sort()
while len(br) != 0:
    t = len(br) - 1
    br = [j * 3 if i != t else j / 2 for i,j in enumerate(br)]
    count += 1
    if br[t] % 2 == 1:
        del br[t]
print(count)

Submission status: Runtime Error

Solution code:
import sys
array =[]
for line in sys.stdin.readlines():
    array.append(line.rstrip())
num1 = array[0]
box =list()
num2 = array[1]
for i in range(0,len(num2)-2) :
    box.append(int(num2.split(" ")[i]))
def is_even(num):
    return num % 2 != 0
box.sort()    

count =0
for j in range(0,len(box)):
    while(True):
        if box[j]%2==0:
            count+=1
            box[j]=box[j]//2
        else:
            break;
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

m = 1
for i in range(n):
    m = m * a[i]

i = 0
while m % 2 == 0:
    m = int(m / 2)
    i = i + 1

print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a.sort()
a.reverse()

i=0
count=0

while True:
    if a[i]%2 == 0:
        a[i] = a[i]/2
        for j in range(len(a)-i-1):
            a[j+i+1] *= 3
        i=0
        count += 1
    else:
        if i == len(a) - 1:
            break
        i += 1

print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

print(count)

Submission status: Runtime Error

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

def is_all_odd(lists):
    odd_flag = 1
    for i in lists:
        if i % 2 != 0:
            odd_flag *= 1
        else:
            odd_flag *= 0
    if odd_flag == 1:
        return True
    else:
        return False

def main():
    #入力
    N = int(input())
    a = list(map(int, input().split()))
    print(a)

    #変数
    count = 0

    while not is_all_odd(a):
        devide_flag = 0
        for i in range(N):
            if a[i] % 2 == 0 and devide_flag == 0:
                a[i] = int(a[i]/2) 
                devide_flag = 1
            else:
                a[i] = a[i] * 3
        count += 1
        print(a)
    
    print(count)




if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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


count = 0
i=0
while(i <= len(a)):
    if a[i] % 2 == 0:
        count += 1
        a[i] = int(a[i] // 2)
        continue
    else:
        i += 1

print(count)

Submission status: Runtime Error

Solution code:
count = 0
i=0
while(i < len(a)):
    if a[i] % 2 == 0:
        count += 1
        a[i] = int(a[i] // 2)
        continue
    else:
        i += 1

print(count)

Submission status: Runtime Error

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


count = 0



while(True):
    even_count = 0
    even_index = 0
    for i in range(len(i)):
        if a[i] % 2 == 0:
            even_index = i
            even_count += 1

    if even_count >= 2:
        count += 1
        a[even_index] = int(a[even_index] / 2)
    else:
        break

print(count)

Submission status: Runtime Error

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

from operator import mul
from functools import reduce

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

if len(even_list) == 0:
    print(0)
else:
    m = reduce(mul, even_list)
    count = 0
    while True:
        m = m / 2
        count += 1
    
        if m % 2 == 1:
            break

    print(count)

Submission status: Runtime Error

Solution code:
ALL = input().split()
N = int(ALL[0])
a = ALL[1:N + 1]
answer = 0

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

Submission status: Runtime Error

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

b = []
for n in a:
    if n % 2 == 0:
        b.append(n)

cnt = 0

while any(n % 2 == 0 for n in b):
    b = sorted(b)
    cnt += 1
    for i in range(len(b)):
        if i == len(b)-1:
            b[i] = b[i]/2
        else:
            b[i] = b[i]*3

    b = [n for n in b if n%2 == 0]

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
a = [int(input()) for i in range(N) ]
count = 0
for i in range(N):
	for j in range(len(a)):
 		if a[j] % 2 == 0:
    		count += 1
            a[j] /= 2
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
a = [int(input()) for i in range(N) ]
count = 0
for i in range(N):
	for n in a:
 		if n % 2 == 0:
    		count += 1
            n /= 2
print(count)