Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i]/2 == 1:
      B = True
  if not B:
    array = map(calc, array)
    kaisu += 1
  else:
    break
        
print(kaisu)

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
import matplotlib
import matplotlib.pyplot as plt
import numpy as np

N = input()
B = False
kaisu = 0
array = map(int,input().split())

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i]/2 == 1:
      B = True
  if not B:
    array = map(calc, array)
    kaisu += 1
  else:
    break
        
print(kaisu)

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array = map(int,input().split())

def calc(n):
  retuen n/2
  
  
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    		B = True
  	if !B:
    	array = map(calc, array)
    	kaisu += 1
  	else:
    	break
        
print(kaisu)
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array = map(int,input().split())

def calc(n):
  retuen n/2
  
  
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    		B = True
  	if B == False:
    	array = map(calc, array)
    	kaisu += 1
  	else:
    	break
        
print(kaisu)
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array = map(int,input().split())

def calc(n):
  retuen n/2
  
  
while B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu += 1
  	else:
    	break
        
print(kaisu)
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array = map(int,input().split())
while B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu += 1
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array = map(calc ,array)
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array[] = map(calc ,array[])
    	kaisu++
  	else:
    	break
        
print(kaisu)

def calc(n):
  retuen n/2
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
N = input()
B = False
kaisu = 0
array[] = map(int,input().split())
while !B:
	for i in range(N):
  		if array[i]/2 == 1:
    	B = True
  	if B == False:
    	array[] = map(calc ,array[])
    	kaisu++
  	else:
    	break
        
print(kaisu)
    

    

Fixed submission:
N = int(input())
B = False
kaisu = 0
array = list(map(int,input().split()))

def calc(n):
  return int(n) / 2
  
  
while not B:
  for i in range(N):
    if array[i] % 2 == 1:
      B = True
  if not B:
    array = list(map(calc, array))
    kaisu += 1
  else:
    break
        
print(kaisu)

Buggy python submission (verdict: Runtime Error):
import fraction
from functools import reduce

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def reduce_gcd(numbers):
    return reduce(fraction.gcd, numbers)


def main():
    N = int(input())
    A_N = list(map(int, input().rstrip().split()))
    gcd = reduce_gcd(A_N)
    factorized = factorize(gcd)
    if factorized:
        print(factorized[0][1])
    else:
        print('0')


if __name__ == '__main__':
    main()


Fixed submission:
import fractions
from functools import reduce


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def reduce_gcd(numbers):
    return reduce(fractions.gcd, numbers)


def main():
    N = int(input())
    A_N = list(map(int, input().rstrip().split()))
    gcd = reduce_gcd(A_N)
    factorized = factorize(gcd)
    if factorized:
        print(factorized[0][1])
    else:
        print('0')


if __name__ == '__main__':
    main()