Harryxun/stf_run huggingface dataset:
n = int(input())
if n ==1:
    print("Hello World")
else:
    a, b = map(int, input().split())
    print(a+b)

### FIXED CODE ###


n = int(input())
if n ==1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
#from collections import deque
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
A = A[::-1]
B = list(map(int, input().split()))

book = A + B
sum_a = sum(A)
sum_b = sum(B)

l = 0
r = len(A)
time = sum_a
ans = 0
#print(book)
while ((r < len(book))|(l <= len(A))):
    if time + book[r] <= K:
        time += book[r]
        ans = max(ans,len(book[l:r])+1)
        r += 1
    elif r == l:
        r += 1
        l += 1
    else:
        time -= book[l]
        l += 1

    #print(l, r)
    #print(ans)
    #print()

book = B[::-1]+A[::-1]

l = 0
r = len(B)
time = sum_b

while ((r < len(book))|(l <= len(B))):
    if time + book[r] <= K:
        time += book[r]
        ans = max(ans,len(book[l:r])+1)
        r += 1
    elif r == l:
        r += 1
        l += 1
    else:
        time -= book[l]
        l += 1
    


print(ans)
    

### FIXED CODE ###

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

sum_a = [0]
sum_b = [0]
ans = 0
for i in range(1,len(A)+1):
    sum_a.append(sum_a[i - 1] + A[i - 1])
for i in range(1,len(B)+1):
    sum_b.append(sum_b[i - 1] + B[i - 1])


j = len(sum_b)-1
for i in range(len(sum_a)):
    if sum_a[i] > K: break
    while (sum_b[j] + sum_a[i] > K):
        j -= 1
    ans = max(ans, i + j)

    
print(ans)
ab = input().split(" ")

n = 0

while n >= 0:
	if n*(ab[0]-1) >= ab[1]-ab[0]:
		break
	else:
		n += 1

input(n+1)

### FIXED CODE ###

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

cnt = 1
k = a

while k < b:
  k += a-1
  cnt += 1

if b == 1:
  print(0)
else:
  print(cnt)
input_line = list(map(int, input().split()))
a = input_line[0]
b = input_line[1]

x = b - a

for i in range(1, x):
    x += i;
print(abs(x-b))
    

### FIXED CODE ###

# coding: utf-8
# Your code here!

input_line = int(input())

if input_line < 1000:
    print("ABC")
else:
    print("ABD")
K=int(input())
A,B=map(int,input().split())
a=0
for i in range(A,B+1):
  if i%k==0:
    a+=1
if a==1:
  print("OK")
else:
  print("NG")

### FIXED CODE ###

k=int(input())
a,b=map(int,input().split())
s=""
for i in range(a,b+1):
  if i%k==0:
    s="OK"
    print(s)
    break
if s!="OK":
  print("NG")
# D
N, K = map(int, input().split())
A = list(map(int, input().split()))
dct = {i+1:a for i,a in enumerate(A)}
visited = [0] * N
visited[0] = 1
if (K <= 2 * 10**5):
    nex = 1
    for _ in range(K):
        nex = dct[nex]
    print(nex)
else:
    cnt = 0
    nex = 1
    for _ in range(N):
        cnt += 1
        nex = dct[nex]
        visited[nex-1] += 1
        if visited[nex-1] > 1:
            break
    cnt1 = 0
    nex1 = 1
    for _ in range(N):
        cnt1 += 1
        nex1 = dct[nex1]
        if nex1 == nex:
            break
    l = (K - cnt1) % (cnt - cnt1)
    for i in range(l):
        nex = dct[nex]
print(nex)

### FIXED CODE ###

# D
N, K = map(int, input().split())
A = list(map(int, input().split()))
dct = {i+1:a for i,a in enumerate(A)}
visited = [0] * N
visited[0] = 1
if (K <= 2 * 10**5):
    nex = 1
    for _ in range(K):
        nex = dct[nex]
    print(nex)
else:
    cnt = 0
    nex = 1
    for _ in range(N):
        cnt += 1
        nex = dct[nex]
        visited[nex-1] += 1
        if visited[nex-1] > 1:
            break
    cnt1 = 0
    nex1 = 1
    for _ in range(N):
        cnt1 += 1
        nex1 = dct[nex1]
        if nex1 == nex:
            break
    if (cnt - cnt1) == 0:
        print(1)
    else:
        l = (K - cnt1) % (cnt - cnt1)
        for i in range(l):
            nex = dct[nex]
        print(nex)
import numpy as np

n = int(input())

l = np.array(list(map(int,input().split())))
l.sort()
def num(first,second,third):
    if l[first] < l[second] + l[third]:
        dp[first] += 1
        if third > 0:
            num(first,second,third-1)
        elif second > 1:
            num(first,second-1,second-2)
        else:
            return
    else:
        if second == third + 1:
            return
        else:
            if second > 1:
                num(first,second-1,second-2)


            


dp = np.array([0]*n)

for i in range(n-1,1,-1):
    num(i,i-1,i-2)
print(np.sum(dp))

### FIXED CODE ###

import numpy as np
n = int(input())

l = np.array(list(map(int,input().split())))

l.sort()
l = l[::-1]
ans = 0
for i in range(n-2):
    j = i+1
    k = n-1
    while j < k:
        if l[i] < l[j] + l[k]:
            ans += k - j
            j += 1
        else:
            k -= 1
print(ans)
a,b,x = map(int, input().split())
if x == 1:
    ans = b-a+1
else:
    if a < b:
        if a % x == 0 and b % x == 0:
            ans = (b-a)//x + 1
        elif a % x == 0 or b % x == 0:
            ans = (b-a+1)//x + 1
        else:
            ans = (b-a+1)//x
    else:
        if a % x:
            ans = 0
        else:
            ans = 1

print(ans)



### FIXED CODE ###

a = input().split()
s = a[1][0].upper()
print('A'+s+'C')
a, b = map(int,input().split())
A = [[]*b for i in range(a)]
B = [] * b

for i in range(a):
    A[i] = map(int,input().split())

for i in range(b):
    B[i] = int(input())

for i in range(a):
    s=0
    for j in range(b):
        s+=A[i][j]*B[j]
    print(s)

### FIXED CODE ###

a, b = map(int,input().split())
A = [[0]*b for i in range(a)]
B = [0] * b

for i in range(a):
    A[i] = list(map(int,input().split()))

for i in range(b):
    B[i] = int(input())

for i in range(a):
    s=0
    for j in range(b):
        s+=A[i][j]*B[j]
    print(s)
n = int(input())
s = input()
ans = 0
for i in range(10):
    if str(i) in s:
        t = s[s.index(str(i))+1:]
    for j in range(10):
        if str(j) in t:
            u = t[t.index(str(j))+1:]
        for k in range(10):
            if str(k) in u:
                ans +=1
print(ans)

### FIXED CODE ###


n = int(input())
s = input()
ans = 0
for i in range(10):
    if str(i) in s:
        t = s[s.index(str(i))+1:]
        for j in range(10):
            if str(j) in t:
                u = t[t.index(str(j))+1:]
                for k in range(10):
                    if str(k) in u:
                        ans +=1
print(ans)
s, t = input().split()
x = zip(s, t)
y = []
for i, j in x:
    if i == j:
        y.append('')
    else:
        y.append('@')
print(y.count('@'))

### FIXED CODE ###

a = input()
b = input()
u=zip(a,b)
x=[]
for i,j in u: 
    if i==j:
        x.append("") 
    else: 
        x.append("*")
print (x.count("*"))
N = input()
A = set(list("ACGT"))
ans = []
for i in range(len(N)):
    cnt = 0
    for n in N[i:]:
        if n in A:
            cnt += 1
        else:
            ans.append(cnt)
            break
print(max(ans))

### FIXED CODE ###

N = list(input())
A = set(list("ACGT"))
ans = [0]
for i in range(len(N)):
    cnt = 0
    for n in N[i:]:
        if n in A:
            cnt += 1
        else:
            break
        ans.append(cnt)
print(max(ans))
# -*- coding: utf-8 -*-
from collections import defaultdict

n = int(input())
patterns = defaultdict(int)

last_x, last_y = map(int, input().split())
for _ in range(1, n):
    x, y = map(int, input().split())
    diff_x = x - last_x
    diff_y = y - last_y
    last_x, last_y = x, y
    pattern = '{0}, {1}'.format(diff_x, diff_y)
    patterns[pattern] += 1

ans = n - max(patterns.values())

print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
from collections import defaultdict

n = int(input())
pairs = list()
patterns = defaultdict(int)

for _ in range(n):
    pairs.append(tuple((map(int, input().split()))))

for i in range(n):
    for j in range(n):
        if i != j:
            patterns[(pairs[i][0] - pairs[j][0], pairs[i][1] - pairs[j][1])] += 1

ans = 1
if n > 1:
    ans = n - max(patterns.values())

print(ans)
n,k = map(int, input().split())
p = list(map(int, input().split()))
ans = 0

for i in range(n-k+1):
    if i==0:
        t=sum(p[0:k])
    else:
        t=t-p[i-1]+p[i+k-1]
    ans=max(ans,ts)

print((ans+k)/2)

### FIXED CODE ###

n,k = map(int, input().split())
p = list(map(int, input().split()))
ans = 0

for i in range(n-k+1):
    if i==0:
        t=sum(p[0:k])
    else:
        t=t-p[i-1]+p[i+k-1]
    ans=max(ans,t)

print((ans+k)/2)
import sys
input = sys.stdin.readline

N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
Amin = min(A)
tmp = []
for _ in range(M):
    a,b= list(map(int,input().split()))
    if b>=Amin:
        tmp.append([a,b])

tmp = sorted(tmp,key = lambda x:-x[1])
cnt = 0
t = []
for i in range(M):
    t=t+[tmp[i][1]]*tmp[i][0]
    cnt+= tmp[i][0]
    if cnt >=N:
        break
A = sorted(A+t,reverse = 1)

print(sum(A[:N]))


### FIXED CODE ###

import sys
input = sys.stdin.readline

def sol():
    N,M = list(map(int,input().split()))
    A = list(map(int,input().split()))
    tmp = sorted([list(map(int,input().split())) for _ in range(M)],key = lambda x:-x[1])

    t = []
    for a,b in tmp:
        t+=[b]*a
        
        if len(t) >=N:
            break

    A += t
    A.sort(reverse = 1)
    print(sum(A[:N]))

if __name__ == '__main__':
    sol()
n=int(input())
if n==1:
	print('Hello World')
	exit()
else:
	a,b=map(int,input().split())
	print(a+b)

### FIXED CODE ###

n=int(input())
if n==1:
	print('Hello World')
	exit()
else:
	a=int(input())
	b=int(input())
	print(a+b)
A=int(input())
B=int(input())
ans=str()
if max(A,B)<9:
    ans="Yay!"
else:
    ans=":("
print(ans)

### FIXED CODE ###

A,B=map(int, input().rstrip().split())
ans=str()
if max(A,B)<9:
    ans="Yay!"
else:
    ans=":("
print(ans)
a=list(map(int,input().split())).sort()
if a[0]+a[1]==a[2]:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

a,b,c=sorted(map(int,input().split()))
if a+b==c:
  print('Yes')
else:
  print('No')
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

dic = {}
for s in sys.stdin:
  d = [ e.lower() for e in map(str,s.split()) ]
  for e in d:
    if e in dic:
      dic[e] += 1
    else:
      dic[e] = 1


sdict = sorted(dic.items(),key=lambda x:-x[1])
maxnum = sdict[0][1]
for i in range(len(sdict)):
  if sdict[i][1] == maxnum:
    print sdict[i][0],
  else:
    break


maxlen = max([len(e) for e in d])
longterm = [ e for e in d if len(e) == maxlen ]
for e in longterm:
  print e,

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

a = raw_input()
b = a.split()
c = [ i.lower() for i in b ]
e = {}
h = {}
for d in c:
  if d not in e:
    h[d] = len(d)
    e[d] = 1
  else:
    e[d] += 1
f = [ (v,k) for k,v in e.items() ]
f.sort()
f.reverse()
maxnum = f[0][0]
for g in f:
  if g[0] != maxnum:
    break
  print g[1],
i = [ (v,k) for k,v in h.items() ]
i.sort()
i.reverse()
maxnum = i[0][0]
for j in i:
  if j[0] != maxnum:
    break
  print j[1],
a, b , c = map(int(input().split()))
ans = a * b // 2
print(ans)

### FIXED CODE ###

e = list(map(int, input().split()))
e.sort()
print(int(e[0]*e[1]*(1/2)))
# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
  	if s[i] != s[-1*i-1]:
      return False
  return True

if kaibun(s):
  s_half = s[:(len(s)-1)//2]
  if kaibun(s_half):
    ans = 'Yes'
  else:
    ans = 'No'
else:
  ans = 'No'

# 出力
print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
    if s[i] != s[-1*i-1]:
      return False
  return True

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)
n = input()
 
if ((n[0] == n[1] == n[2] or (n[1] == n[2] == n[3])):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = input()
if(N[0] == N[1] == N[2] or
   N[1] == N[2] == N[3]):
    print('Yes')
else:
    print('No')
a = map(int, raw_input().split())
if ((a[0] == a[1]) or (a[0] == a[2]) or (a[2] == a[1])):
  if ((a[0] == a[1]) and (a[2] == a[1])):
    print("No")
  else:
    print("Yes")
else:
  print("No")

### FIXED CODE ###

a = list(map(int, input().split()))
if ((a[0] == a[1]) or (a[0] == a[2]) or (a[2] == a[1])):
  if ((a[0] == a[1]) and (a[2] == a[1])):
    print("No")
  else:
    print("Yes")
else:
  print("No")
def main(Hitpoint,Attack):
  count_num = 0
  while true:
    Hitpoint -= Attack
    count_num += 1
    if Hitpoint <= 0:
      break

if __name__ == "__main__":
    inp=input()   
    main(inp.replace(' ', ','))

### FIXED CODE ###

def main(Hitpoint,Attack):
  count_num = 0
  while True:
    Hitpoint -= Attack
    count_num += 1
    if Hitpoint <= 0:
      break
  return count_num
 
if __name__ == "__main__":
    inp=input().split()
    hitpoint = int(inp[0])
    attack = int(inp[1])
    print(main(hitpoint,attack))
# coding: utf-8
import sys
from itertools import permutations,combinations
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

# 全探索
INF = 10 ** 5
answer = INF
N = ir()
A = lr()
B = lr()
for pattern in combinations(range(N), (N+1)//2):
    pattern = set(pattern)
    red = []
    blue = []
    for i in range(N):
        if i in pattern:
            red.append((B[i], i) if i&1 else (A[i], i))
        else:
            blue.append((A[i], i) if i&1 else (B[i], i))
    red.sort()
    blue.sort()
    temp = 0
    for i in range(N//2):
        if red[i][0] > blue[i][0]:
            break
        if i + 1 < len(red) and red[i+1] < blue[i]:
            break
        temp += abs(red[i][1] - 2 * i)
        temp += abs(blue[i][1] - (2 * i + 1))
    else:
        if N&1 and blue[-1][0] > red[-1][0]:
            continue
        temp //= 2
        if temp < answer:
            answer = temp

print(answer if answer != INF else -1)
# 12

### FIXED CODE ###

# coding: utf-8
import sys
from itertools import permutations,combinations
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

# 全探索
INF = 10 ** 5
answer = INF
N = ir()
if N == 1:
    print(0); exit()
A = lr()
B = lr()
for pattern in combinations(range(N), (N+1)//2):
    pattern = set(pattern)
    red = []
    blue = []
    for i in range(N):
        if i in pattern:
            red.append((B[i], i) if i&1 else (A[i], i))
        else:
            blue.append((A[i], i) if i&1 else (B[i], i))
    red.sort()
    blue.sort()
    result = []
    
    for i in range(N//2):
        if red[i][0] > blue[i][0]:
            break
        if i + 1 < len(red) and red[i+1][0] < blue[i][0]:
            break
        result.append(red[i][1])
        result.append(blue[i][1])
    else:
        if N&1 and blue[-1][0] > red[-1][0]:
            continue
        if N&1:
            result.append(red[-1][1])
        temp = 0
        used = set()
        for i in range(N):
            for x in used:
                if result[i] < x:
                    temp += 1
            used.add(result[i])            
        if temp < answer:
            answer = temp

print(answer if answer != INF else -1)
# 12
sys.setrecursionlimit(10**6)
edges = {}
p = []

def dfs(target_node, keisyo_point):
    global p
    p[target_node] += keisyo_point
    next_node = edges[target_node]
    if not next_node:
        return
    else:
        for next in next_node:
            dfs(next, p[target_node])

def main():
    global edges, p
    n, q = map(int, input().split())
    edges = {e: [] for e in range(1, n+1)}
    for _ in range(n - 1):
        a, b = tuple(map(int, input().split()))
        edges[a].append(b)
    p = [0] * (n + 1)
    for _ in range(q):
        p1, x1 = map(int, input().split())
        p[p1] += x1

    dfs(1, 0)
    for i1 in range(1, n + 1):
        print(p[i1], end=' ')

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
edges = {}
p = {}
done_nodes = set()

def dfs(target_node, keisyo_point):
    global p
    done_nodes.add(target_node)
    p[target_node] += keisyo_point
    next_node = edges[target_node]
    if not next_node:
        return
    else:
        for next in next_node:
            #edges[next].pop(edges[next].index(target_node))
            #dfs(next, p[target_node])
            if next in done_nodes:
                pass
            else:
                dfs(next, p[target_node])

def main():
    global edges, p
    n, q = map(int, input().split())
    edges = {e: [] for e in range(1, n+1)}
    for _ in range(n - 1):
        a, b = tuple(map(int, input().split()))
        edges[a].append(b)
        edges[b].append(a)
    p = {e: 0 for e in range(1, n+1)}
    for _ in range(q):
        p1, x1 = map(int, input().split())
        p[p1] += x1

    dfs(1, 0)
    for i1 in range(1, n + 1):
        print(p[i1], end=' ')

if __name__ == '__main__':
    main()
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [i//2 for i in a]

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

def lcm(x, y):
  z = x * y
  if x < y:
    x, y = y, x
  while x%y != 0:
    x, y = y, x%y
  return z // y

t = f(a[0])
for i in range(1, t):
  if f(a[i]) != t:
    print(0)
    break
  a[i] >>= t
m >>= t

l = 1
for i in range(n):
  l = lcm(l, a[i])
  if l > m:
    break

m //= l
ans = (m+1) // 2
print(ans)

### FIXED CODE ###

import sys

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

def gcd(x, y):
  if y:
    return gcd(y, x%y)
  else:
    return x

def lcm(x, y):
  return (x * y) // gcd(x, y)


n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [i//2 for i in a]

t = f(a[0])
for i in range(n):
  if f(a[i]) != t:
    print(0)
    sys.exit()
  a[i] >>= t
m >>= t

l = 1
for i in range(n):
  l = lcm(l, a[i])
  if l > m:
    print(0)
    sys.exit()

m //= l
ans = (m+1) // 2
print(ans)
n = int(input())
m = 10**12
a = int((n**0.5)//1)
for i in a:
  if n%i==0:
    m=min(m,i+(n/i)-2)
print(m)

### FIXED CODE ###

n = int(input())
 
b = 10**12
a = int((n**0.5)//1)
for i in range(1,a+1):
  if n%i==0:
    b = min(b,int(i+(n//i)-2))
print(b)
a = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]
x,y = input().split()
for i in range(3):
	if (x and y) in a[i]:
    	print('Yes')
        exit()
print('No')

### FIXED CODE ###

a = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]
x,y = map(int, input().split())
for i in range(3):
    if (x in a[i]) and (y in a[i]):
        print('Yes')
        exit()
print('No')
import math

a = input()
a = a.strip()

if isinstance(math.sqrt(a), int):
    print('Yes')
else:
    print('No')


### FIXED CODE ###

import math

a = input()
b = int(a.replace(' ', ''))

if abs(int(math.sqrt(b)) - math.sqrt(b)) < 10e-6 :
    print('Yes')
else:
    print('No')
from math import gcd,ceil
a,b=map(int,input().split())
print(gcd(a,b))

### FIXED CODE ###

a,b=map(int,input().split())
if a>b:
    ans=a
    a-=1
else:
    ans=b
    b-=1
print(ans+max(a,b))
def solve():
    N, K = map(int, input().split())
    a = [[] for _ in [0]*10]
    l = []
    for c, g in (tuple(map(int, input().split())) for _ in [0]*N):
        a[g-1].append(c)

    for i, prices in enumerate(a):
        ln = len(prices)
        if ln == 0:
            continue
        dp = [[-1]*(K+1) for _ in [0]*(ln+1)]
        dp[0][0] = 0
        for j, price in enumerate(prices):
            for k, prev in enumerate(dp[j][:j+1]):
                if prev > dp[j+1][k]:
                    dp[j+1][k] = prev
                if prev+price+k*2 > dp[j+1][k+1]:
                    dp[j+1][k+1] = prev+price+k*2
        l.append(dp[-1][1:ln+1])

    dp = [0]*(K+1)
    for prices in l:
        for i, price in enumerate(prices, start=1):
            for j, cur, prev in zip(range(K, -1, -1), dp[::-1], dp[K-i::-1]):
                if prev+price > cur:
                    dp[j] = prev+price

    print(max(dp))
    

if __name__ == "__main__":
    solve()

### FIXED CODE ###

def solve():
    N, K = map(int, input().split())
    a = [[] for _ in [0]*10]
    l = []
    for c, g in (tuple(map(int, input().split())) for _ in [0]*N):
        a[g-1].append(c)

    for i, prices in enumerate(a):
        ln = len(prices)
        if ln == 0:
            continue
        dp = [0]*(K+1)
        for j, price in enumerate(prices):
            _k = j if j < K-1 else K-1
            for k, prev, cur in zip(range(_k, -1, -1), dp[_k::-1], dp[_k+1::-1]):
                if prev+price+k*2 > cur:
                    dp[k+1] = prev+price+k*2
        l.append(dp[1:ln+1])

    dp = [float("-inf")]*(K+1)
    dp[0] = 0
    for prices in l:
        cdp = dp[:]
        for i, price in enumerate(prices, start=1):
            if i > K:
                break
            for j, cur, prev in zip(range(K, -1, -1), cdp[::-1], dp[K-i::-1]):
                if 0 < prev+price > cur:
                    cdp[j] = prev+price
        dp = cdp

    print(max(dp))


if __name__ == "__main__":
    solve()
n, a, b = (int(x) for x in input().split())
if (b - a) % 2 == 0:
  ans = (b-a) // 2
else:
  ans = min(a-1, n-b) + 1 + (B−A−1)//2
print(ans)

### FIXED CODE ###

n, a, b = (int(x) for x in input().split())
if (b - a) % 2 == 0:
	ans = (b-a) // 2
else:
	ans = min(a-1, n-b) + 1 + (b-a-1)//2
print(ans)
n = int(input())
l = []
for i in range(n):
    l.append(list(map(int, input().split())))
for i in range(101):
    for j in range(101):
        H = l[0][2]+abs(i-l[0][0])+abs(j-l[0][1])
        for k in range(1,n):
            if not h==max(H-abs(i-l[k][0])-abs(j-l[k][1]), 0):
                break
            if k==n-1 and h>0:
                print(i,j,h)
                import sys
                sys.exit()

### FIXED CODE ###

N = int(input())
xyh = [list(map(int,input().split())) for _ in range(N)]
xyh = sorted(xyh, key = lambda x: -x[2])
tx, ty, th = xyh[0]
for Cx in range(101):
  for Cy in range(101):
    H = th + abs(tx - Cx) + abs(ty - Cy)
    if(all(h == max(H - abs(x - Cx) - abs(y - Cy), 0) for x,y,h in xyh)):
      print(Cx, Cy, H)
      exit()
n = int(input())
s = [input() for i in range(n)]
ss = sorted(set(s))
l = len(ss)
if len(s)==l:
    for i in ss:
        print(s)
else:
    d = []
    for i in ss:
        d.append([i,0])
    for i in s:
        d[ss.index(i)][1]+=1
    d = sorted(d, key = lambda x:(-x[1],x[0]))
    for i in d:
        if i[1]==d[0][1]:
            print(i[0])

### FIXED CODE ###

import collections
n = int(input())
l = []
s = collections.Counter([input() for i in range(n)])
mn = 0
for i in s.most_common():
    if i[1] >= mn:
        mn = i[1]
        l.append(i[0])
    else:
        break
for i in sorted(l):
        print(i)
n = int(input())
s = 0
for i in range(n+1):
  l = list(i)
  if len(l) % 2 == 1:
    s += 1
print(s)

### FIXED CODE ###

n = int(input())
s = 0
for i in range(1,n+1):
  l = list(str(i))
  if len(l) % 2 == 1:
    s += 1
print(s)
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1]:
        ans.append(ido+0)
        ido=0

print(max(ans))


### FIXED CODE ###

# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[0]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1]:
        ans.append(ido+0)
        ido=0

print(max(ans))
N,M = map(int,input().split())
A = []
S = []
for i in range(N):
  A.append(list(map(int,input().split())))
for i in range(1,K):
  S.append(A[i])
s_count = [x for x in S if S.count(x) == N]
  print(len(S_count))

### FIXED CODE ###

N,M = map(int,input().split())
A = [0]*M
ans = 0
for i in range(N):
  k = list(map(int,input().split()))
  for j in range(1,len(k)):
    A[k[j]-1] += 1
for i in range(len(A)):
  if A[i] == N:
    ans += 1
print(ans)