Harryxun/stf_run huggingface dataset:
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
    A[i] -= i + 1

sortA = sorted(A)
b1 = sortA[(N-1)//2]
b2 = sortA[(N-1)//2+1]

ans1 = 0
ans2 = 0
for i in range(N):
    ans1 += abs(b1-A[i])
    ans2 += abs(b2-A[i])

print(min(ans1, ans2))


### FIXED CODE ###

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

for i in range(N):
    A[i] -= i + 1

sortA = sorted(A)

if(N>1):
    b1 = sortA[(N-1)//2]
    b2 = sortA[(N-1)//2+1]

    ans1 = 0
    ans2 = 0
    for i in range(N):
        ans1 += abs(b1-A[i])
        ans2 += abs(b2-A[i])

    print(min(ans1, ans2))
else:
    print(0)
n = int( input( ) )
s = [ int( val ) for val in input( ).split( " " ) ]
q = int( input( ) )
t = [ int( val ) for val in input( ).split( " " ) ]

cnt = 0
cnt = 0
for ti in t:
	low = 0
	high = n - 1
	while low <= high:
		m = ( low+high )/2
		if ti < s[m]:
			high = m - 1
		elif s[m] < ti:
			low = m + 1
		else:
			cnt += 1
			break

print( cnt )

### FIXED CODE ###

n = int( input( ) )
s = [ int( val ) for val in input( ).split( " " ) ]
q = int( input( ) )
t = [ int( val ) for val in input( ).split( " " ) ]
t.sort( )

cnt = 0
for ti in t:
	low = 0
	high = n - 1
	while low <= high:
		m = ( low+high )//2
		if ti < s[m]:
			high = m - 1
		elif s[m] < ti:
			low = m + 1
		else:
			cnt += 1
			break

print( cnt )
w, a, b = map(int, input().split())

if b > a + w:
    print(b - a - w)
elif b + w < a:
    print(a - b - w)
else:
    print(0)
w, a, b = map(int, input().split())

if b > a + w:
    print(b - a - w)
elif b + w < a:
    print(a - b - w)
else:
    print(0)


### FIXED CODE ###

w, a, b = map(int, input().split())

if b > a + w:
    print(b - a - w)
elif b + w < a:
    print(a - b - w)
else:
    print(0)
N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
 
def isfeasible(L):
  k = 0
  sub = []
  for i in range(N):
    a = A[i]
    if a < L:
      sub.append([a, "small"])
      break
    if a%L == 0:
      dk = a//L - 1
      sub.append([a, dk, "just"])
    else:
      dk = a//L
      sub.append([a, dk, "over"])
    k += dk
    if k > K:
      #print("out")
      return False
  #print("ok")
  return True
 
l = 0
r = A[0]
if K == 0:
  print(A[0])
else:
  while r-l>0:
    L = (r+l)//2
    #print("[", l, ",", r,"]checking ", L)
    if isfeasible(L):
      r = L
    else:
      l = L+1
  print(r)

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
 
def isfeasible(L):
  k = 0
  for a in A:
    if a < L:
      break
    if a%L == 0:
      dk = a//L - 1
    else:
      dk = a//L
    k += dk
    if k > K:
      return False
  return True
 
l = 0
r = A[0]

while r-l>1:
  L = (r+l)//2
  if isfeasible(L):
    r = L
  else:
    l = L
print(r)
s=input()
t=input()
u=[]
v=[]
s_len=len(s)
for i in range(s_len):
    s_i=s[i]
    t_i=t[i]
    ts=t_i+s_i
    if s_i!=t_i:
        if ts not in u:
            u.append(ts)
    elif s_i not in v:
        v.append(s_i)
u_len=len(u)
ans="Yes"
if u_len!=0:
    u.sort()
    u.append("XX")
    u_len=len(u)
    for i in range(u_len):
        if u[i][0] in v or u[i][1] in v:
            ans="No"
            break
        elif u[i][0]==u[i+1][0] and u[i][1]!=u[i+1][1]:
            ans="No"
            break       
print(ans)

### FIXED CODE ###

from operator import itemgetter
s=input()
t=input()
u=[]
v=[]
s_len=len(s)
for i in range(s_len):
    s_i=s[i]
    t_i=t[i]
    ts=t_i+s_i
    if s_i!=t_i:
        if ts not in u:
            u.append(ts)
    elif s_i not in v:
        v.append(s_i)
u_len=len(u)
ans="Yes"
if u_len!=0:
    u1=sorted(u)
    u1.append("XX")
    for i in range(u_len):
        if u1[i][0] in v or u1[i][1] in v:
            ans="No"
            break
        elif u1[i][0]==u1[i+1][0] and u1[i][1]!=u1[i+1][1]:
            ans="No"
            break
    if ans=="Yes":
        u2=sorted(u,key=itemgetter(1))
        u2.append("XX")
        for i in range(u_len):
            if u2[i][0]!=u2[i+1][0] and u2[i][1]==u2[i+1][1]:
                ans="No"
                break
print(ans)
import itertools

#19 choose 9
#92378

def main():
    N, M, Q = map(int, input().split())
    Q = []
    final_score = 0
    for i in range(Q):
        Q.append(list(map(int, input().split())))
    for A in itertools.combinations_with_replacement(range(1, M+1), N):
        score = 0
        for q in Q:
            if A[q[1]-1] - A[q[0]-1] == q[2]:
                score += q[3]
            final_score = max([final_score, score])
    print(final_score)
main()

### FIXED CODE ###

import itertools

#19 choose 9
#92378

def main():
    N, M, Q = map(int, input().split())
    Q_l = []
    final_score = 0
    for i in range(Q):
        Q_l.append(list(map(int, input().split())))
    for A in itertools.combinations_with_replacement(range(1, M+1), N):
        score = 0
        for q in Q_l:
            if A[q[1]-1] - A[q[0]-1] == q[2]:
                score += q[3]
            final_score = max([final_score, score])
    print(final_score)
main()
import math
n=int(input())
print(math.ceil(n/2))

### FIXED CODE ###

n,r=map(int,input().split())
ans = r
if n<10:
  ans = r+100*(10-n)
print(ans)
input(A)
if 1<=A<=100 and 1<=B<=100:
    print(A*B)
    

### FIXED CODE ###

str=input()
arr=str.split(' ')
A=int(arr[0])
B=int(arr[1])
if 1<=A<=100 and 1<=A<=100:
  print(A*B)
import fractions

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
A,B,C,D = input().split()
A = int(A)-1
s = fractions.lcm(int(C),int(D))
#s = int(C)*int(D)
#numac = int(A)//int(C)#10//6 = 1
#numad = int(A)//int(D)#10//8 = 1
#numacd = int(A)//s#10//24 = 0
numa = int(A)//int(C) + int(A)//int(D) - int(A)//s
#numa = 1
#numbc = int(B)//int(C)#40//6 = 6
#numbd = int(B)//int(D)#40//8 = 5
#numbcd = int(B)//s#40//24= 1
numb = int(B)//int(C) + int(B)//int(D) - int(B)//s
#numb = 1
print(int(B)-int(A)-(numb - numa))

### FIXED CODE ###

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
A,B,C,D = input().split()
A = int(A)-1
s = lcm(int(C),int(D))
#s = int(C)*int(D)
#numac = int(A)//int(C)#10//6 = 1
#numad = int(A)//int(D)#10//8 = 1
#numacd = int(A)//s#10//24 = 0
numa = int(A)//int(C) + int(A)//int(D) - int(A)//s
#numa = 1
#numbc = int(B)//int(C)#40//6 = 6
#numbd = int(B)//int(D)#40//8 = 5
#numbcd = int(B)//s#40//24= 1
numb = int(B)//int(C) + int(B)//int(D) - int(B)//s
#numb = 1
print(int(B)-int(A)-(numb - numa))
N=int(input())

Takahashi=[]
Aoki=[]

for i in range(N):
  A,B=map(int,input().split())
  if A>B:
    symbol='p'
  else:
    symbol='m'
  Takahashi.append((abs(A-B),B,i,A))
  Aoki.append((abs(B-A),A,i,B))

Takahashi=sorted(Takahashi,key=lambda x: (x[0],x[1]),reverse=True)
Aoki=sorted(Aoki,key=lambda x: (x[0],x[1]),reverse=True)

#print(Takahashi)

turn=0
Asum=0
Bsum=0
while Takahashi:
  if turn%2==0:
    Asum+=Takahashi[0][3]
    index=Takahashi[0][2]
    Takahashi.pop(0)
    Aoki=[x for x in Aoki if x in Takahashi] 
  else:
    Bsum+=Aoki[0][3]
    index=Aoki[0][2]
    Aoki.pop(0)
    Takahashi=[x for x in Takahashi if x in Aoki]
    
    
  turn+=1
  #print(Takahashi)
  #print(Aoki)
print(Asum-Bsum) 

### FIXED CODE ###

N=int(input())

goukei=[]

for i in range(N):
  A,B=map(int,input().split())
  goukei.append((A+B,A,B))

goukei.sort(key=lambda x:x[0],reverse=True)

Asum=0
Bsum=0
for i in range(N):
  if i%2==0:
    Asum+=goukei[i][1]
  else:
    Bsum+=goukei[i][2]
    
print(Asum-Bsum)
import numpy as np
H, W, M = map(int, input().split())
HW = []
A = np.zeros((H, W), dtype='int')

for _ in range(M):
    h, w = map(int, input().split())
    h, w = h - 1, w - 1  # 0-indexed
    HW.append((h, w))
    A[h, w] = 1

arr = A.sum(axis=0)
col_max = arr.max()
col_idx = np.where(arr == col_max)[0]

arr = A.sum(axis=1)
row_max = arr.max()
row_idx = np.where(arr == row_max)[0]

# print(A.sum(axis=0).argsort()[-1])

for r in row_idx:
    for c in col_idx:
        if A[r, c] == 0:
            ans = col_max + row_max
            print(ans)
            exit()
ans = col_max + row_max - 1
print(ans)


### FIXED CODE ###

import numpy as np
H, W, M = map(int, input().split())

C = [0] * W
R = [0] * H
S = set()
for _ in range(M):
    h, w = map(int, input().split())
    h, w = h - 1, w - 1  # 0-indexed
    C[w] += 1
    R[h] += 1
    S.add((h, w))

col_max = max(C)
col_idx = [i for i in range(W) if C[i] == col_max]
row_max = max(R)
row_idx = [i for i in range(H) if R[i] == row_max]

ans = col_max + row_max
for r in row_idx:
    for c in col_idx:
        if not (r, c) in S:
            print(ans)
            exit()
print(ans - 1)
a=int(input())
b,c=map(int,input().split())
d=0
f=0
while d<a:
  e=(b//int(input()))
  if e==0:
    f+=e
  else:
    f+=(e+1)
    c+=f
    d+=1
    print(c)


  
  

### FIXED CODE ###

a=int(input())
b,c=map(int,input().split())
d=0
while d<a:
  e=((b-1)//int(input()))+1
  c+=e
  d+=1
print(c)
print(["YES","NO"][bool(len([set(input.split())-set([5,5,7])]))])

### FIXED CODE ###

l=input().split();list.sort(l);print(["NO","YES"][l==["5","5","7"]])
s = [int(i) for i in input().split()]
print('s'.swapcase(1200))

### FIXED CODE ###

s = input()
print(s.swapcase())
from collections import defaultdict

n=int(input())
c=[]
for _ in range(n): c.append(list(map(int,input().split())))
dic=defaultdict(int)
for i in range(0,n-1):
    for j in range(i+1,n):
        temp=(abs(c[i][0]-c[j][0]),abs(c[i][1]-c[j][1]))
        dic[temp]+=1
print(n-max(dic.values()))

### FIXED CODE ###

from collections import defaultdict
n=int(input())
c=[]
for _ in range(n): c.append(list(map(int,input().split())))
dic=defaultdict(int)
for i in range(n):
    for j in range(n):
        if i==j: continue
        dic[(c[i][0]-c[j][0],c[i][1]-c[j][1])]+=1
if dict(dic): print(n-max(dic.values()))
else: print(1)
from math import gcd

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

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

l = 1
for i in a:
    l = lcm(l, i)

ans = 0
for i in a:
    ans += l // i

print(ans % 1000000007)

### FIXED CODE ###

def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)
def lcm(a, b):
    return a // gcd(a, b) * b

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

l = 1
for i in a:
    l = lcm(l, i)

ans = 0
for i in a:
    ans += l // i

print(ans % 1000000007)
a = input()
ans = 0

for i in range(3):
    if (a[i] == '1'):
        ans += 1

print(ans)


### FIXED CODE ###

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

ans = -1
f = True

while (f):
    ans += 1
    for i in range(n):
        if (A[i] == 0 or A[i] % 2 != 0):
            f = False
            break
        A[i] /= 2

print(ans)
a,b=map(int,raw_input().split())

if a<b:
  print 'a<b'
else if a>=b:
  print 'a>=b'
else:
  print 'a==b'

### FIXED CODE ###

a,b=map(int,raw_input().split())

if a>b:
  print 'a > b'
elif a<b:
  print 'a < b'
else:
  print 'a == b'
N = int(input())
cnt = 1000

while true:
  if cnt > N:
    print(N - cnt)
  else:
    cnt += 1000
break

### FIXED CODE ###

N = int(input())
a = 1000 - N
while a < 0:
	a += 1000
print(a)
S, W = map(int, input().split())

if W &gt;= S:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

S, W = map(int, input().split())
if W >= S:
  print("unsafe")
else:
  print("safe")
import copy
class Dice2:
    def __init__(self, nums):
        self.nums = nums
        self.dic = \
                {(1,2):3, (1,3):5, (1,4):2, (1,5):4, (2,3):1, (2,4):6, (2,6):3, (3,5):1, (3,6):5, (4,5):6, (4,6):2, (5,6):4}
    def output_right(self, x):
        nums = self.nums
        y = copy.deepcopy(x)
        x.sort()
        key = tuple(x)
        if tuple(y)==key:
            return nums[self.dic[key]-1]
        else:
            return nums[6-self.dic[key]]

dice = Dice2(list(map(int, input().split())))
q = int(input())
for i in range(q):
    print(dice.output_right(list(map(int, input().split()))))

### FIXED CODE ###

import copy
class Dice2:
    def __init__(self, nums):
        self.nums = nums
        self.dic = \
                {(1,2):3, (1,3):5, (1,4):2, (1,5):4, (2,3):1, (2,4):6, (2,6):3, (3,5):1, (3,6):5, (4,5):6, (4,6):2, (5,6):4}
    def output_right(self, x):
        x[0] = self.nums.index(x[0]) + 1
        x[1] = self.nums.index(x[1]) + 1
        nums = self.nums
        y = copy.deepcopy(x)
        x.sort()
        key = tuple(x)
        if tuple(y)==key:
            return nums[self.dic[key]-1]
        else:
            return nums[6-self.dic[key]]

dice = Dice2(list(map(int, input().split())))
q = int(input())
for i in range(q):
    print(dice.output_right(list(map(int, input().split()))))
N = int(input())
S = input()
if N%2 == 1:
    print("No")
    exit()
t = S[:N/2]
if S[N/2:] == t:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N = int(input())
S = input()
if N%2 == 1:
    print("No")
    exit()
if S[N//2:] == S[:N//2]:
    print("Yes")
else:
    print("No")
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n,m = map(int, input().split())
    a = list(map(int, input().split()))
    def gcd(a, b):
        if b == 0:
            return a
        else:
            return gcd(b, a % b)
    
    def gcd_group(arr):
        g = gcd(arr[0], arr[1])
        for i in range(2, len(arr)):
            g = gcd(g, arr[i])
        return g
    
    def lcm(a, b):
        g = gcd(a, b)
        return (a*b)//g
    
    def lcm_group(arr):
        l = lcm(arr[0], arr[1])
        for i in range(2, len(arr)):
            l = lcm(l, arr[i])
        return l
    for i in range(n):
        a[i] //= 2
    b = lcm_group(a)
    
    if m < b:
        print(0)
    else:
        print((m-b)//(2*b) + 1)

if __name__ == '__main__':
    main()

### FIXED CODE ###

'''
https://atcoder.jp/contests/abc150/tasks/abc150_d
'''
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

    if len(a) == 1:
        if m >= a[0]//2:
            print((m-a[0]//2) // a[0] + 1)
        else:
            print(0)
        exit()

    def gcd(a, b):
        if b == 0:
            return a
        else:
            return gcd(b, a % b)
    
    def gcd_group(arr):
        g = gcd(arr[0], arr[1])
        for i in range(2, len(arr)):
            g = gcd(g, arr[i])
        return g
    
    def lcm(a, b):
        g = gcd(a, b)
        return (a*b)//g
    
    def lcm_group(arr):
        l = lcm(arr[0], arr[1])
        for i in range(2, len(arr)):
            l = lcm(l, arr[i])
        return l
    g = gcd_group(a)
    for i in a:
        if (i//g)%2 == 0:
            print(0)
            exit()
    lcm = lcm_group(a)
    semi_lcm = lcm // 2
    if m >= semi_lcm:
        print((m-semi_lcm)//lcm + 1)
    else:
        print(0)


if __name__ == '__main__':
    main()
import math
A,B,H,M=map(int,input().split())

C=[]
for i in range(10):
    if 0<abs(360*i-abs(30*H-6*M))<180:
        a=abs(360*i-abs(30*H-6*M))
        break
b=min(a,abs(30*H-6*M))

print("{:.12f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2))))

### FIXED CODE ###

import math
A,B,H,M=map(int,input().split())

for i in range(10):
    if 0<=abs(360*i-abs(30*H+(M/2)-6*M))<360:
        a=abs(360*i-abs(30*H+(M/2)-6*M))
        c=abs(360-abs(360*i-abs(30*H+(M/2)-6*M)))
        break
b=min(a,c)

print("{:.9f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2))))
N, M = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]

roots = [(i,1) for i in range(N+1)] # root, num_islands_in_group

inconveniences = [0]*(M+1)
inconveniences[-1] = N*(N-1)//2 #すべての橋が崩落するとNC2

def find_root(a, roots=roots):
  if roots[a][0] == a:
    return roots[a]
  else:
    roots[a] = find_root(roots[a][0])
  return roots[a]

def reduce_inconvenience_with_unite(a, b, roots=roots):
  root_a, n_a = find_root(a)
  root_b, n_b = find_root(b)
  if root_a == root_b:
    return 0
  else:
    roots[root_a] = (root_b, n_a + n_b) # 二項目は何でも良い
    roots[root_b] = (root_b, n_a + n_b)
    return n_a * n_b

for i, ab in enumerate(AB[:0:-1]): #実は1個めの橋は全く関係ない
  a, b = ab
  inconveniences[M-1-i] = inconveniences[M-i] - reduce_inconvenience_with_unite(a,b)

for inc in inconveniences[1:]:
  print(inc)


### FIXED CODE ###

N, M = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]

roots = [(i,1) for i in range(N+1)] # root, num_islands_in_group

inconveniences = [0]*(M+1)
inconveniences[-1] = N*(N-1)//2 #すべての橋が崩落するとNC2

def find_root(a, roots=roots):
  if roots[a][0] == a:
    return roots[a]
  else:
    roots[a] = find_root(roots[a][0])
  return roots[a]

def reduce_inconvenience_with_unite(a, b, roots=roots):
  root_a, n_a = find_root(a)
  root_b, n_b = find_root(b)
  if root_a == root_b:
    return 0
  else:
    if n_a > n_b:
      roots[root_a] = (root_a, n_a + n_b) # 二項目は何でも良い
      roots[root_b] = (root_a, n_a + n_b)
    else:
      roots[root_a] = (root_b, n_a + n_b) # 二項目は何でも良い
      roots[root_b] = (root_b, n_a + n_b)
    return n_a * n_b

for i, ab in enumerate(AB[:0:-1]): #実は1個めの橋は全く関係ない
  a, b = ab
  inconveniences[M-1-i] = inconveniences[M-i] - reduce_inconvenience_with_unite(a,b)

for inc in inconveniences[1:]:
  print(inc)
def digits(n):
    if n < 10: return 1
    c = 0
    while n > 0:
        c += 1
        n = n // 10

    return c

inp = input()
while (inp != ''):
    n, m = inp.split(' ')
    n = int(n)
    m = int(m)
    print(digits(n + m))
    inp = input()

### FIXED CODE ###

def digits(n):
    if n < 10: return 1
    c = 0
    while n > 0:
        c += 1
        n = n // 10

    return c

while 1:
    try:
        inp = input()
    except EOFError:
        break
    else:
        n, m = inp.split(' ')
        n = int(n)
        m = int(m)
        print(digits(n + m))
N = int(input())
S = str(input())

if N%2 == 1:
    print('No')
    exit()

n = (N/2)
j = True


for i in range(n):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

import math
N = int(input())
S = str(input())

if N == 1:
    print('No')
    exit()
if N%2 == 1:
    print('No')
    exit()

n = (N//2)
j = True


for i in range(n):
    if S[i] != S[i + n]:
        j = False

if j:
    print('Yes')
else:
    print('No')
a,b=input().split()
print( min(a*int(b), b*(int(a) ) ) 

### FIXED CODE ###

a, b = input().split()
 
print(min(a*int(b), b*int(a) ) )
h, w = map(int, input().split())
s = [['.']*(w+2)]
s = s + [['.']+list(input())+[','] for _ in range(w)]
s = s + [['.']*(w+2)]
for i in range(1, w+1):
    for j in range(1, w+1):
        if s[i][j] == '#':
           up = s[i-1][j]
           left = s[i][j-1]
           right = s[i][j+1]
           down = s[i+1][j]
           if up == '.' and left == '.' and right == '.' and down == '.':
               print('No')
               exit()
print('Yes')


### FIXED CODE ###

H, W = map(int, input().split())
s = [list(input()) for _ in range(H)]
 
flag = False
for i in range(H):
    for j in range(W):
        if s[i][j] == '#':
            if (j-1 >= 0 and s[i][j-1] == '.') and (j+1 < W and s[i][j+1] == '.') and (i-1 >= 0 and s[i-1][j] == '.') and (i+1 < H and s[i+1][j] == '.'):
                print('No')
                flag = True
                break
    if flag:
        break
else:
    print('Yes')
A, B, C = map (int, input().split())

print(min(C,　B　//　A))

### FIXED CODE ###

A, B, C = map (int, input().split())

if A * C <= B:
    print(C)
elif A * C >= B:
    print(B // A)
N,M = map(int,input().split())
X = list(map(int,input().split()))
X.sort()
A = []
for i in range(M-1):
    A.append(X[i+1]-X[i])
A.sort()
print(sum(A[:M-N]))

### FIXED CODE ###

N = int(input())
L = list(map(int,input().split()))
if max(L) < sum(L)-max(L):
    print('Yes')
else:
    print('No')
N = int(input())
A = list(map(int, input().split()))
ans = 0
while(True):
    for i in range(N):
        if A[i] % 2 == 0:
            A[i] = A[i] / 2
        else:
            break
    ans += 1

print(ans)


### FIXED CODE ###

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

if a[1] == "1":
    ans = ans + 1

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

print(ans)
n = int(input())
l = list(map,int().split())
s = 0
for i in range(n):
  j = i + 1
  while j <= n:
    s += l[i] * l[j]
  	j += 1
print(s)

### FIXED CODE ###

n = int(input())
l = list(map(int, input().split()))
s = 0
for i in range(n):
  j = i + 1
  while j <= n - 1:
    s += l[i] * l[j]
    j += 1
print(s)
print(int(input()) ** 3)

### FIXED CODE ###

print(int(input())**3)
n, m = map(input().split())

print('Yes' if n == m else 'No')

### FIXED CODE ###

n, m = map(int, input().split())

print('Yes' if n == m else 'No')
s=input()
t=input()
s=s.sort()
t=t.sort(reverse=True)
if s<t:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s=input()
t=input()
new_s=sorted(s)
new_s="".join(new_s)
new_t=sorted(t,reverse=True)
new_t="".join(new_t)
if new_s<new_t:
  print("Yes")
else:
  print("No")
import heapq
N,M = map(int,input().split())
jobs = [ [] for _ in range(M+1) ]
for _ in range(N):
  a,b = map(int,input().split())
  jobs[a].append(b)

pq = []
d = 1
res = 0
for _ in range(M-1, -1, -1):
  for b in jobs[d]:
    heapq.heappush(pq, -b)
  if pq:
    res += -heapq.heappop(pq)
  d += 1

print(res)

### FIXED CODE ###

import heapq
N,M = map(int,input().split())
jobs = [ [] for _ in range(M+1) ]
for _ in range(N):
  a,b = map(int,input().split())
  if a <= M:
    jobs[a].append(b)

pq = []
d = 1
res = 0
for _ in range(M-1, -1, -1):
  for b in jobs[d]:
    heapq.heappush(pq, -b)
  if pq:
    res += -heapq.heappop(pq)
  d += 1

print(res)
import math
a,b,k = list(map(int,input().split()))
c = math.gcd(a,b)
d = list()
e = 0
for i in range(1,(c//2)+1):
    if c%i == 0:
        e +=1
        if e == k:
            print(int(c/i))

### FIXED CODE ###

a,b,k = list(map(int,input().split()))
c= 1
d=0
if b < a:
    a,b=b,a
while True:
    d = b%a
    if d == 0:
        c=a
        break
    else:
        b = a
        a = d
e = 0
for i in range(1,c+1):
    if c%i == 0:
        e +=1
        if e == k:
            print(int(c/i))
            break
x=input()
for y in x:
  if y=="7":
    return "Yes"
return "No"


### FIXED CODE ###

x=input()
z="No"
for y in x:
  if y=="7":
    z="Yes"
print(z)
while True:
    n, x = map(int, input().split())
    if (n == x == 0):
    break

    count = 0
    for a in range(1, n):
        for b in range(a + 1, n):
            for c in range(b + 1, n):
                Sum = a + b + c
                if (Sum == x):
                    count = count + 1
    print(count)

### FIXED CODE ###

while True:
    n, x = map(int, input().split())
    if (n == x == 0):
        break

    count = 0
    for a in range(1, x // 3):
        for b in range(a + 1, x // 2):
            for c in range(b + 1, n + 1):
                Sum = a + b + c
                if (Sum == x):
                    count += 1 
    print(count)
i=0

while c!=0:
    c = int(input())
    if c == 0 : break
    c=c+1
    print "Case %d: %d" %  (c, a)

### FIXED CODE ###

i=0

while True:
    a = int(input())
    if(a==0):
      break
    i = i+1
    print "Case %d: %d" %  (i,a)