Harryxun/stf_run huggingface dataset:
n = int( input())
a = list( int(input().split()))
cnt = 0

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)    


### FIXED CODE ###

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

for i in range ( 1, len(a)-1):
  if (a[i-1]<a[i]<a[i+1]) or (a[i+1]<a[i]<a[i-1]):
    cnt += 1
    
print (cnt)
from collections import deque
import sys
sys.setrecursionlimit(10**7)

N,M=map(int,input().split())
Graph=[[] for i in range(N)]
for i in range(M):
  L,R,D=map(int,input().split())
  Graph[L-1].append(R-1,D)
  Graph[R-1].append(L-1,-D)
visit=[False]*N
dist=[0]*N

for i in range(N):
  if not visit[i]:
    visit[i]=True
    A=deque()
    A.append(i)
    while A:
      x=A.pop()
      for y,d in Graph[x]:
        if visit[y] and dist[y]!=d+dist[x]
        	print('No')
          	exit()
        elif not visit[y]:
          visit[y]=True
          A.append(y)
          dist[y]=d+dist[x]
print('Yes')

### FIXED CODE ###

from collections import deque
import sys
sys.setrecursionlimit(10**7)
 
N,M=map(int,input().split())
Graph=[[] for i in range(N)]
for i in range(M):
  L,R,D=map(int,input().split())
  Graph[L-1].append((R-1,D))
  Graph[R-1].append((L-1,-D))
visit=[False]*N
dist=[0]*N
 

for i in range(N):
  if not visit[i]:
    visit[i]=True
    A=deque()
    A.append(i)
    while A:
      x=A.pop()
      for y,d in Graph[x]:
        if visit[y] and (dist[y]!=d+dist[x]):
          print('No')
          exit()
        elif not visit[y]:
          visit[y]=True
          A.append(y)
          dist[y]=d+dist[x]
print('Yes')
# AtCoder Beginner Contest 178
# C - Ubiquity
import math

N=int(input())

mod=10**9+7

print((10**N)%mod-(9**N)%mod)-(9**N)%mod+(8**N)%mod)

### FIXED CODE ###

# AtCoder Beginner Contest 178
# C - Ubiquity

N=int(input())

mod=10**9+7

print(((10**N)-(9**N)-(9**N)+(8**N))%mod)
# AtCoderでsympyがimportできるか

import math
import statistics
import numpy as np
import sympy as sym
import queue

a,b = map(int, input().split())
if a > 9 or b > 9:
  print('-1')
else:
  print(a * b)


### FIXED CODE ###

# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

a,b = map(int, input().split())
if a > 9 or b > 9:
  print('-1')
else:
  print(a * b)
import sys,io,os
I = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
I = input

n,m = map(int, I().split())
p=[-1]*(n+1)
s=[0]*(n+1)
S=n-1
def t(a):
	while p[a] != -1:
		a = p[a]
	return a
for _ in range(m):
	a,b=map(int, I().split())
	a,b = t(a), t(b)
	if a != b:
		S -= 1
		if s[a] > s[b]:
			a,b = b,a
		p[a] = b
		s[b] += s[a]
print(S)



### FIXED CODE ###

import sys,io,os
I = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
#I = input

n,m = map(int, I().split())
p=[-1]*(n+1)
s=[0]*(n+1)
S=n-1
def t(a):
	b = a
	while p[b] != -1:
		b = p[b]
	while p[a] != -1:
		p[a],a = b,p[a]
	return a
for _ in range(m):
	a,b=map(int, I().split())
	a,b = t(a), t(b)
	if a != b:
		S -= 1
		if s[a] > s[b]:
			a,b = b,a
		p[a] = b
		s[b] += s[a]
print(S)
s = int(input())
if = 3 or 5 or 7:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

X = int(input())
if X == 3 or X ==5 or X == 7:
  print("YES")
else:
  print("NO")
K, N = map(int, input().split())
houselist = list(map(int, input().split()))
max=0
for i in range(1,N-1):
  if houselist(i)-houselist(i-1)>max:
    max=houselist(i)-houselist(i-1)
if K+houselist(0)-houselist(N)>max:
  max=K+houselist(0)-houselist(N)
print(K-max)

### FIXED CODE ###

K, N = map(int, input().split())
houselist = list(map(int, input().split()))
max=0
for i in range(1,N):
  if houselist[i]-houselist[i-1]>max:
    max=houselist[i]-houselist[i-1]
if K+houselist[0]-houselist[N-1]>max:
  max=K+houselist[0]-houselist[N-1]
if max==0:
  print(0)
else:
  print(K-max)
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
judge = False
ans = 10**9
for i in range(2**N):
  even = []
  odd = []
  x = 0
  tmp = True
  for j in range(N):
    if ((i>>j) & 1):
      if j%2==1:
        even.append([B[j],j])
      else:
        odd.append([B[j],j])
      
    else:
      if j%2==1:
        odd.append([A[j],j])
      else:
        even.append([A[j],j])
        
  if N%2==0:
    if len(even)!=len(odd):
      continue
      
  else:
    if (len(even)-1)!=len(odd):
      continue
      

  even = sorted(even,key = lambda x:x[0])
  odd = sorted(odd,key = lambda x:x[1])
  ind = [0]*N
  for k in range(N//2):
    o = odd[k]
    e = even[k]
    if (o[0]<e[0])or(o[0]>even[k+1][0]):
      tmp = False
      break
  
    else:
      ind[2*k]=e[1]
      ind[2*k+1]=o[1]
      
  if tmp:
    if N%2==1:
      ind[N-1]=even[-1][1]
    for k in range(N):
      y = ind[k]
      x+=abs(y-k)
      ind = [x+1 if (x<y)and(x>=k) else x for x in ind]
    ans = min(ans,x)
    judge = True
    
if judge:
  print(ans)
else:
  print(-1)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
judge = False
ans = 10**9
for i in range(2**N):
  even = []
  odd = []
  x = 0
  tmp = True
  for j in range(N):
    if ((i>>j) & 1):
      if j%2==1:
        even.append([B[j],j])
      else:
        odd.append([B[j],j])
      
    else:
      if j%2==1:
        odd.append([A[j],j])
      else:
        even.append([A[j],j])
        
  if N%2==0:
    if len(even)!=len(odd):
      continue
      
  else:
    if (len(even)-1)!=len(odd):
      continue
      

  even = sorted(even,key = lambda x:x[0])
  odd = sorted(odd,key = lambda x:x[0])
  ind = [0]*N
  for k in range(N//2):
    o = odd[k]
    e = even[k]
    if o[0]<e[0]:
      tmp = False
      break
    
    if (k!=N//2-1)or(N%2==1):
      if o[0]>even[k+1][0]:
        tmp = False
        break
    
    ind[2*k]=e[1]
    ind[2*k+1]=o[1]

  if tmp:
    if N%2==1:
      ind[N-1]=even[-1][1]
      

    for k in range(N):
      y = ind[k]
      x+=abs(y-k)
      ind = [x+1 if (x<y)and(x>=k) else x for x in ind]
    ans = min(ans,x)
    judge = True
    
if judge:
  print(ans)
else:
  print(-1)
W,H,x,y = map(int,input().split())

ans = 0
if W % 2 == 0:
    if W // 2 == x:
        ans += 1
if H % 2 == 0:
    if H //2 == y:
        ans += 1

if ans == 2:
    ans = 1
else:
    ans = 0

if x == 0 or y == 0:
    ans = 0


tate = min((W-x)*H , (x - 0)*H)
yoko = min((H-y)*W , (y - 0)*W)

k = max(tate,yoko)

if (x == W and y == 0) or (x == 0 and y == H) or (x == W and y == H) or (x == 0 and y == 0):
    k = (W*H)/2
    ans = 0

if H == W:
    if x == y:
        k = (W*H)/2
    elif y + x == H:
        k = (W*H)/2


if H == 1 and  Y == 1:
    k = 0.5
    ans = 0


print(k,ans,sep=" ")


### FIXED CODE ###

W,H,x,y = map(int,input().split())

ans = 0
if W % 2 == 0 and W//2==x and H %2 == 0 and H//2==y:
    ans = 1

tate = min((W-x)*H , (x - 0)*H)
yoko = min((H-y)*W , (y - 0)*W)
k = max(tate,yoko)

if (x == W and y == 0) or (x == 0 and y == H) or (x == W and y == H) or (x == 0 and y == 0):
    k = (W*H)/2

if H == W:
    if x == y:
        k = (W*H)/2
    elif y + x == H:
        k = (W*H)/2



k = (W*H)/2
print(k,ans,sep=" ")
n = int(input())
num_list = [ int(v) for v in input().split() ]
mode = 1
ans = 0
for i in range(n-1):
  if mode == 1 and num_list[i+1] < num_list[i]:
  	mode = -1
    ans += 1
  elif mode == -1 and num_list[i+1] > num_list[i]:
  	mode = 1
    ans += 1
  
  
print(ans+1)

### FIXED CODE ###

n = int(input())
num_list = [ int(v) for v in input().split() ]
cut_list = []
status = 0
for i in range(n-1):
    if status == 0:
        if num_list[i+1] > num_list[i]:
            status = 1
        elif num_list[i+1] < num_list[i]:
            status = -1
    elif status == 1:
        if num_list[i+1] < num_list[i]:
            cut_list.append(i)
            status = 0
    elif status == -1:
        if num_list[i+1] > num_list[i]:
            cut_list.append(i)
            status = 0

print(len(cut_list)+1)
_=input()
A=eval('*'.join(input().split()))
print(-1 if A>1000000000000000000 else A)

### FIXED CODE ###

_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)

r = []
i = 0
while i < n:
    if a[i] == a[i + 1]:
        r.append(a[i])
        i += 2
    else:
        i += 1
    if len(r) == 2:
        break
if len(r) == 2:
    print(r[0] * r[1])
else:
    print(0)

### FIXED CODE ###

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

r = []
i = 0
while i < n:
    if i < n - 1 and a[i] == a[i + 1]:
        r.append(a[i])
        i += 2
    else:
        i += 1
    if len(r) == 2:
        break
if len(r) == 2:
    print(r[0] * r[1])
else:
    print(0)
nums = [int(i) for i in input().split()]
sort_nums = sort.nums
print(" ".join(sort_nums))

### FIXED CODE ###

nums = [int(i) for i in input().split()]
sort_nums = sorted(nums)
nums_str = map(str,sort_nums)
print(' '.join(nums_str))
print(input().count(1))

### FIXED CODE ###

s = input()
ans = 0
if s[0]=="1":
    ans += 1
    
if s[1]=="1":
    ans += 1

if s[2]=="1":
    ans += 1

print(ans)
N = int(input())
s = {}
for i in range(N):
  a = input()
  if a in s:
    s[a] += 1
  else:
    s[a] = 1
M = int(input())
t = {}
for i in range(M):
  b = input()
  if b in t:
    t[b] += 1
  else:
    t[b] = 1
ans = 0
for p in s:
  if p in t:
    m = s[p] - t[p]
  else:
    m = s[p]
  if m > n:
    ans = m
print(ans)
  

### FIXED CODE ###

N = int(input())
s = {}
for i in range(N):
  a = input()
  if a in s:
    s[a] += 1
  else:
    s[a] = 1
M = int(input())
t = {}
for i in range(M):
  b = input()
  if b in t:
    t[b] += 1
  else:
    t[b] = 1
ans = 0
for p in s:
  if p in t:
    m = s[p] - t[p]
  else:
    m = s[p]
  if m > ans:
    ans = m
print(ans)
x=2
print(x**3\n)


### FIXED CODE ###

x=int(input())
result = x**3
print(result)
S = input()
T = input()
count = 0
for i in len(S):
    if S[i] != T[i]:
        count+= 1
print(count)



### FIXED CODE ###

S = input()
T = input()
count = 0
for i in range(len(S)):
    if S[i] != T[i]:
        count+= 1
print(count)
N, P = map(int, input().split())

res = 1
i = 2

if N == 1:
    print(P)
    exit()

while True:
    if i > P ** (1 / N) + 1:
        break
    if P % pow(i, N) == 0:
        res = i

    i += 1

print(res)


### FIXED CODE ###

N, P = map(int, input().split())

if N == 1:
    print(P)
    exit()

div = 2
res = 1
R = P

while div * div <= R and div <= P:
    cnt = 0
    while P % div == 0:
        P /= div
        cnt += 1

        if cnt == N:
            res *= div
            cnt = 0
    div += 1

print(res)
a=input()
list=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
if list(a)==False:
  print("A")
else:
  print("a")


### FIXED CODE ###

a = input()
print('a' if a.islower() else 'A')
N=int(input())
li = [0] * 100002

for n in range(N):
  li[int(input())] += 1

ans = 0

for i in li:
  if i % 2 == 1:
    ans += 1

print(ans)

### FIXED CODE ###

N=int(input())
sets = set()

for n in range(N):
  a = int(input())
  
  if a in sets:
    sets.remove(a)
  else:
    sets.add(a)

print(len(sets))
from collections import Counter
H, W, M = map(int, input().split())

h = [0] * M
w = [0] * M
for i in range(M):
    h[i], w[i] = map(int, input().split())


S = Counter(h)
T = Counter(w)

if (M == 1):
    print(1)

else:

    if (S.most_common()[0][1] > T.most_common()[0][1]):
        smc = S.most_common()[0][0]
        for i in range(M):
            if (h[i] == smc):
                w[i] = 'boom'

        w1 = [s for s in w if s != 'boom']
        T = Counter(w1)
        tmc = T.most_common()[0][0]
        for i in range(len(w1)):
            if (w1[i] == tmc):
                w1[i] = 'boom' 

        w2 = [s for s in w1 if s != 'boom']
        print(M-len(w2))

    else:
        tmc = T.most_common()[0][0]
        for i in range(M):
            if (w[i] == tmc):
                h[i] = 'boom'

        h1 = [s for s in h if s != 'boom']
        S = Counter(h1)
        smc = S.most_common()[0][0]
        for i in range(len(h1)):
            if (h1[i] == smc):
                h1[i] = 'boom' 

        h2 = [s for s in h1 if s != 'boom']
        print(M-len(h2))

### FIXED CODE ###

from collections import Counter
import sys
H, W, M = map(int, input().split())

h = [0] * M
w = [0] * M
for i in range(M):
    h[i], w[i] = map(int, input().split())


S = Counter(h)
T = Counter(w)

if (M == 1):
    print(1)

else:
    if (S.most_common()[0][1] > T.most_common()[0][1]):
        smc = S.most_common()[0][0]
        for i in range(M):
            if (h[i] == smc):
                w[i] = 'boom'

        w1 = [s for s in w if s != 'boom']
        T = Counter(w1)
        if (len(w1) == 0):
            print(M)
            sys.exit()
        tmc = T.most_common()[0][0]
        for i in range(len(w1)):
            if (w1[i] == tmc):
                w1[i] = 'boom' 

        w2 = [s for s in w1 if s != 'boom']
        print(M-len(w2))

    else:
        tmc = T.most_common()[0][0]
        for i in range(M):
            if (w[i] == tmc):
                h[i] = 'boom'

        h1 = [s for s in h if s != 'boom']
        S = Counter(h1)
        if (len(h1) == 0):
            print(M)
            sys.exit()
        smc = S.most_common()[0][0]
        for i in range(len(h1)):
            if (h1[i] == smc):
                h1[i] = 'boom' 

        h2 = [s for s in h1 if s != 'boom']
        print(M-len(h2))
n = input()
if '7' in n : print('Yes')
else : print('No')127


### FIXED CODE ###

n = input()
if '7' in n : print('Yes')
else : print('No')
def is_circle(current_list, rest_list):
    if rest_list == []:
        if (current_list[-1] ^ current_list[0]) == current_list[1]:
            return True
        else:
            return False
    if len(current_list) == 1:
        for index, num in enumerate(rest_list):
            next_int = current_list[0] ^ num
            if next_int in rest_list:
                if is_circle(current_list + [num], rest_list[:index] + rest_list[index+1:]):
                    return True
        return False

    next_int = current_list[-1] ^ current_list[-2]
    if next_int in rest_list:
        current_list.append(next_int)
        rest_list.remove(next_int)
        return is_circle(current_list, rest_list)
    else:
        return False
        

n = int(input())
input_list = [int(i) for i in input().split(' ')]

if is_circle([input_list[0]], input_list[1:]):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

import collections 

n = int(input())
input_list = [int(i) for i in input().split(' ')]

counter = collections.Counter(input_list)


unique_list = list(counter.keys())
counts = list(counter.values())

if (all(num == 0 for num in unique_list)):
    print('Yes')
else:
    if n % 3 == 0:
        zero_count = counter[0] 
        if zero_count == n / 3 and len(unique_list) == 2:
            print('Yes')
        else: 
            if len(unique_list) != 3:
                print('No')
            elif (unique_list[0] ^ unique_list[1] == unique_list[2]):
                if (all(counts[0] == num for num in counts)):
                    print('Yes')
                else:
                    print('No')
            else:
                print('No')
    else:
        print('No')
from collections import Counter as ct

N = int(input())
k = []
a = 0

for i in range(N):
    s = list(input().split())

for i in range(N - 1):
    for j in range(i + 1, N):
        if ct(s[i]) == ct(s[j]):
            a += 1

print(a)


### FIXED CODE ###

N = int(input())
S = [list(input()) for i in range(N)]

for s in S:
    s.sort()

S.sort()

cnt = 1
ans = 0
tmp = []

for s in S:
    if s == tmp:
        cnt += 1
    else:
        tmp = s
        ans += cnt * (cnt - 1) // 2
        cnt = 1

ans += cnt * (cnt - 1) // 2

print(ans)
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 10 02:27:58 2018

@author: Yuki
"""

N = int(input())
data  = []
for i in range(N-1):
    c, s, f = map(int, input().split())
#    data.append([c, s, f])

def train_time(start_time=0, data_list=[12, 24, 6]):
    if data_list[1] <= start_time:
        return start_time + (data_list[2] - start_time%data_list[2])%data_list[2] + data_list[0]
    else:
        return data_list[1] + data_list[0]

#N = 4
#data = [[12, 24, 6], [52, 16, 4], [99, 2, 2]]

res = []
for i in range(N-1):
    need_time = 0
    for ii in range(i, N-1):
        need_time = train_time(need_time, data[ii])
    res.append(need_time)

for i in range(N-1):
    print(res[i])

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Fri Aug 10 02:27:58 2018

@author: Yuki
"""

N = int(input())
data  = []
for i in range(N-1):
    c, s, f = map(int, input().split())
    data.append([c, s, f])

def train_time(start_time=0, data_list=[12, 24, 6]):
    if data_list[1] <= start_time:
        return start_time + (data_list[2] - start_time%data_list[2])%data_list[2] + data_list[0]
    else:
        return data_list[1] + data_list[0]

#N = 4
#data = [[12, 24, 6], [52, 16, 4], [99, 2, 2]]

res = []
for i in range(N-1):
    need_time = 0
    for ii in range(i, N-1):
        need_time = train_time(need_time, data[ii])
    res.append(need_time)

for i in range(N-1):
    print(res[i])
print(0)
import math


a,b=map(int,input().split())
print((a*b)//math.gcd(a,b))

### FIXED CODE ###

import fractions


a,b=map(int,input().split())
print((a*b)//fractions.gcd(a,b))
n,p=map(int, input().split())
a=list(map(int, input().split()))
total=sum( n%2 for i in a )

if total=0:
    if p==0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))

### FIXED CODE ###

n,p=map(int, input().split())
a=list(map(int, input().split()))
total=sum( i%2 for i in a )

if total==0:
    if p==0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))
n, m = map(int, input().split())
sc = [tuple(map(int, input().split())) for _ in range(m)]
sc = sorted(sc, reverse=True, key=lambda x:x[0])
if sc[0][0] != n:
    print(-1)
    exit()

ans = [0] * n
ans[0] = 1
prev = sc[0]

for i in range(1, m):
    if prev[0] == sc[i][0] and prev[1] != sc[i][1]:
        print(-1)
        exit()
    ans[sc[i][0]-1] = sc[i][1]
    prev = sc[i]
print(ans)
print(''.join(map(lambda x: str(x), ans)))

### FIXED CODE ###

n, m = map(int, input().split())
sc = [tuple(map(int, input().split())) for _ in range(m)]
sc = sorted(sc, key=lambda x:x[0])

if m != 0 and n != 1 and sc[0][0] == 1 and sc[0][1] == 0:
    print(-1)
    exit()
if m == 0 and n == 1:
    print(0)
    exit()

ans = [0] * n
ans[0] = 1
prev = (0, 0)
if m != 0:
    prev = sc[0]
for i in range(m):
    if prev[0] == sc[i][0] and prev[1] != sc[i][1]:
        print(-1)
        exit()
    ans[sc[i][0]-1] = sc[i][1]
    prev = sc[i]
print(''.join(map(lambda x: str(x), ans)))
N = int(input())
L_ls = map(int, input().split())
if sum(L_ls) - 2*max(L_ls) > 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
L_ls = [int(i) for i in input().split()]
if sum(L_ls) - 2*max(L_ls) > 0:
  print("Yes")
else:
  print("No")
n, m = map(int,input().split())

a = [""]*3
rep = []
ans = 0

for i in range(m):
    s,c = input().split()
    if s in rep:
        if c != a[int(s)-1]:
            ans = -1
    rep.append(s)
    a[int(s)-1] = c

if ans == -1:
    print(ans)
else:
    if a[0] == "":
        if a[1] == "":
            print(int(a[2]))
        elif a[2]=="":
            a[2]="0"
            print("".join(a))
    else:
        if a[1] == "":
            a[1] = "0"
            print("".join(a))
        elif a[2]=="":
            a[2]="0"
            print("".join(a))
            

### FIXED CODE ###

n, m = map(int,input().split())
sc = [list(map(int,input().split())) for _ in range(m)]

ans = -1

for i in range(1000):
    s_i = str(i)
    if len(s_i) == n and all(int(s_i[s-1])==c for s,c in sc):
        ans = i
        break

print(ans)
a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき

al=factorization(a) 
bl=factorization(b)

a_s=set()
b_s=set()
for i in range(len(al)):
    a_s.add(al[i][0])
for j in range(len(bl)):
    b_s.add(bl[j][0])
    

s=a_s&b_s
    
print(len(s)+1)

### FIXED CODE ###

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき

al=factorization(a) 
bl=factorization(b)

a_s=set()
b_s=set()
for i in range(len(al)):
    a_s.add(al[i][0])
for j in range(len(bl)):
    b_s.add(bl[j][0])
    

s=a_s&b_s
s.add(1)    

print(len(s))
n = int(raw_input())
ais = map(int, raw_input().split())
c = 0
while(True):
  	if all([ai%2==0 for ai in ais ]):
	  	ais = [ai/2 for ai in ais]	
        c +=1
	else:
      	break
print c

### FIXED CODE ###

n = int(raw_input())
ais = map(int, raw_input().split())
c = 0
while(all([(ai % 2 ==0) for ai in ais ])):
	ais = [ai/2 for ai in ais]	
	c +=1
print c
n = int(input())
x = set(n)
cnt = 1

while True:
    
    cnt += 1
    
    if n%2 == 0:
        n //=2
        
    else:
        n = n * 3 + 1

    if n in x:
        print(cnt)
        exit()
    else:
        x.add(n)

### FIXED CODE ###

n = int(input())
x = set()
cnt = 1
x.add(n)

while True:
    
    cnt += 1
    
    if n%2 == 0:
        n /=2
        
    else:
        n = n * 3 + 1

    if n in x:
        print(cnt)
        break
    else:
        x.add(n)
import sys
input = sys.stdin.readline


def check(arr, x):
    s = sum(arr)
    if (s+x) % 2 == 1:
        return False
    target = (s+x) // 2
    dp = [False] * (target+1)
    dp[0] = True
    for a in arr:
        for i in range(a, target+1):
            dp[i] = dp[i-a]
    return dp[-1]


s = input().rstrip() + 'T'
x, y = map(int, input().split())
X = []
Y = []
xy = 0
f_count = 0
for c in s:
    if c == 'T':
        if xy == 0:
            X.append(f_count)
        else:
            Y.append(f_count)
        f_count = 0
        xy = 1 - xy
    else:
        f_count += 1
x -= X[0]
X.pop(0)
if check(X, x) and check(Y, y):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

def check(arr, x):
    pos = set([0])
    for dx in arr:
        npos = set()
        for p in pos:
            npos.add(p+dx)
            npos.add(p-dx)
        pos = npos
    return x in pos


s = input().split('T')
x, y = map(int, input().split())
d = [len(ss) for ss in s]
dx = d[2::2]
dy = d[1::2]
x -= d[0]
if check(dx, x) and check(dy, y):
    print('Yes')
else:
    print('No')
N, K = map(int, input().split())
p = []
for i in range(N):
    p.append(int(input()))
p.sort()

price = 0
for i in range(3):
    price += p[i]
print(price)

### FIXED CODE ###

N, K = map(int, input().split())
p = [int(x) for x in input().split()]
p.sort()

price = 0
if N > 0:
    for j in range(K):
        price += p[j]
print(price)
r=map(int,input().split())
print(3r**2)


### FIXED CODE ###

r=int(input())
print(3*r**2)
A,B,C = map(int, input().strip())
print(C-(A-B))

### FIXED CODE ###

A,B,C = map(int, input().split())
print(C-min(A-B, C))
a, b = int(input())
print(a * b)

### FIXED CODE ###

a, b = map(int, input().split())
print(a * b)
d = list(input())

for i in range(3):
  if d[i] == "a":
    a = 1
  if d[i] == "b":
    b = 1
  if d[i] == "c":
    c = 1
    
    
if a*b*c == 1:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

a = list(input())
if "a" in a and "b" in a and "c" in a:
	print("Yes")
else:
  print("No")