Harryxun/stf_run huggingface dataset:
N, K=map(int, input())
A=list(map(int, input()))
a=0
for i in A:
	if i>=K:
		a+=1
print(a)

### FIXED CODE ###

N, K=map(int, input().split())
A=list(map(int, input().split()))
a=0
for i in A:
	if i>=K:
		a+=1
print(a)
inport math
a, b = map(int, input().split())
x = (a + b)/2
print(math.ceil(x))

### FIXED CODE ###

import math
a, b = map(int,input().split())
x = (a + b)/2
print(math.ceil(x))
from pip._vendor.distlib.compat import raw_input

l = raw_input().split()
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break


### FIXED CODE ###

t = input()
l = t.split(" ")
N = int(l[0])
K = int(l[1])
count = 0
numbers = list(range(1, N+1))
while True:
    if len(numbers) >= K:
        numbers.pop(0)
        count = count + 1
    else:
        print(count)
        break
import numpy as np
N = int(input())
ans = 10 ** 10
for i in range(2:int(np.sqrt(N)) + 2):
    if not N % i:
        a = max(len(str(i)), len(str(int(121 / 11))))
        ans = min(ans, a)
print(a)

### FIXED CODE ###

import numpy as np
 
N = int(input())
ans = len(str(N))
for i in range(2, int(np.sqrt(N)) + 2):
    if not N % i:
        a = max(len(str(i)), len(str(int(N / i))))
        ans = min(ans, a)
print(ans)
a = int(raw_input())
b = int(raw_input())

if a > b:
	print("Alice")
elif a < b:
	print("Bob")
else:
	print("Draw")


### FIXED CODE ###

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

if a == 1:
	a = 14

if b == 1:
	b = 14

if a > b:
	print "Alice"
elif a < b:
	print "Bob"
else:
	print "Draw"
from collections import deque
N = int(input())
A = sorted([int(x) for x in input().split()])
D = deque(A)
ans = 0
if A[0] == A[1]: 
    ans -= 1
while len(D):
    a = D.popleft()
    ans += 1
    D = deque(filter(lambda x: x%a != 0, D))
print(ans)


### FIXED CODE ###

N = int(input())
A = [int(x) for x in input().split()]
m = max(A)+2
cnt = [0] * m
for a in A:
    cnt[a] += 1
    if cnt[a] == 1:
        for i in range(a+a, m, a):
            cnt[i] += 1
ans = 0
for a in A:
    ans += (cnt[a] == 1)
print(ans)
# -*- coding: <encoding name> -*-

line_1 = input
line_2 = input
line = line_1 + line_2
print('YES' if line == line[::-1] else 'NO')

### FIXED CODE ###

# -*- coding: <encoding name> -*-

line_1 = input()
line_2 = input()
line = line_1 + line_2
print('YES' if line == line[::-1] else 'NO')
a, b = map(int, input().split())
if a*b%2==0:
  print("Even")
 else:
  print("Odd")


### FIXED CODE ###

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

if a*b%2==0:
  print("Even")
else:
  print("Odd")
i = list(map(int, input().split()))
C = i[0]*i[1]
print(c)

### FIXED CODE ###

i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる
c = i[0]*i[1]
print(c)
s = readline()
  
ans = "x" * len(s)

print(ans)

### FIXED CODE ###

s = input()
  
ans = "x" * len(s)

print(ans)
N, Q=map(int, input().split())
T=[[] for _ in range(N)]
for i in range(N-1):
  a,b=map(int, input().split())
  T[a-1].append(b-1)
  T[b-1].append(a-1)
P=[0]*N
ans=[0]*N
for i in range(Q):
  p,x=map(int, input().split())
  P[p-1]+=x

def dfs(start, pre_node, pre_val):
  now_val=(pre_val+P[start])
  ans[start]=now_val
  
  for next in T[start]:
    if next==pre_node:
      continue
    dfs(next, start,now_val)
    
dfs(0,0,0)   
for a in ans:
  print(a, end=" ")

### FIXED CODE ###

from collections import deque 
N,Q=map(int, input().split())
G=[[] for _ in range(N)]
for i in range(N-1):
    a,b=map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
X=[0]*N
for i in range(Q):
    p,x=map(int, input().split())
    X[p-1]+=x
que=deque([(0,-1)])
#print(que)
while que:
    now, pre=que.pop()
    for nex in G[now]:
        if nex==pre:
            continue
        else:
            X[nex]+=X[now]
            que.append((nex,now))

print(" ".join(map(str, X)))
S, T = map(input().split())
A, B = map (int, input().split())
U = input()

if( S==U):
    print(A-1,B)
else:
    print(A,B-1)


### FIXED CODE ###

S, T = input().split()
A, B = map (int, input().split())
U = input()

if( S==U):
    print(A-1,B)
else:
    print(A,B-1)
a,op,b = input().split()

a,b = int(a),int(b)

while True:
	if op == +:
		print(a+b)
	elif op == -:
		print(a-b)
	elif op == *:
		print(a*b)
	elif op == /:
		print(a/b)
	elif op == ?:
		break



### FIXED CODE ###

'''
a,op,b = input().split()

a,b = int(a),int(b)
'''
###############################################################
#whileの中に入れないと同じデータセットでの計算をずっとし続ける#
###############################################################

while True:
	a,op,b = input().split()

	a= int(a)
	b = int(b)

	if op == '+':
		print(a+b)
	elif op == '-':
		print(a-b)
	elif op == '*':
		print(a*b)
	elif op == '/':
		print(a//b)
	elif op == '?':
		break
n = int(input())
# 値の初期化
path = [None]*(n + 1)
adjacent_list = [[] for i in range(n+1)]

for i in range(n - 1):
    a, b, c = list(map(int, input().split()))
    adjacent_list[a].append([b, c])
    adjacent_list[b].append([a, c])
# ノード番号、そこまでの距離,検索済みの要素を受け取る。


def dfs(node_n, distance, finished):
    # 検索済みに追加
    finished.add(node_n)
    # そこまでの距離を代入。値の更新などは特にない（はず）
    path[node_n] = distance
    # 対象ノードに対する隣接リストをforで回す
    for i in adjacent_list[node_n]:
        next = i[0]
        if next not in finished:
            # 検索済みでなかった場合、そこまでのコストを追加し再帰
            dfs(next, distance + i[1], finished)


q, k = list(map(int, input().split()))
dfs(k, 0, set())
# 各クエリへの返答
for i in range(q):
    s, g = list(map(int, input().split()))
    if path[s] is not None and path[g] is not None:
        print(path[s] + path[g])


### FIXED CODE ###

import sys

sys.setrecursionlimit(200000)

n = int(input())
# 値の初期化
path = [None]*(n + 1)
adjacent_list = [[] for i in range(n+1)]

for i in range(n - 1):
    a, b, c = list(map(int, input().split()))
    adjacent_list[a].append([b, c])
    adjacent_list[b].append([a, c])
# ノード番号、そこまでの距離,検索済みの要素を受け取る。


def dfs(node_n, distance, finished):
    # 検索済みに追加
    finished.add(node_n)
    # そこまでの距離を代入。値の更新などは特にない（はず）
    path[node_n] = distance
    # 対象ノードに対する隣接リストをforで回す
    for i in adjacent_list[node_n]:
        next = i[0]
        if next not in finished:
            # 検索済みでなかった場合、そこまでのコストを追加し再帰
            dfs(next, distance + i[1], finished)


q, k = list(map(int, input().split()))
dfs(k, 0, set())
# 各クエリへの返答
for i in range(q):
    s, g = list(map(int, input().split()))
    print(path[s] + path[g])
n,T = map(int, input().split())
i = 1001
 
for _ in range(N):
  c, t = map(int, input().split())
  if t <= T:
    i = min(i, c)

if i == 1001:
  print('TLE')
else:
  print(i)

### FIXED CODE ###

N, T = map(int, input().split())
i = 1001
 
for _ in range(N):
  c, t = map(int, input().split())
  if t <= T:
    i = min(i, c)

if i == 1001:
  print('TLE')
else:
  print(i)
a,b = int(input().split())
print(a*b)

### FIXED CODE ###

a,b = (int(x) for x in input().split())
print(a*b)
t,x = map(int, input().split)
print(float(t)/float(x))

### FIXED CODE ###

t,x = map(int, input().split())
print(float(t)/float(x))
n = int(input())
h = list(map(int, input().split()))

mini = h[0]
for i in range(1,n-1):
    
    if h[i]-1 > mini:
        print("No")
        exit()
    else:
        mini = h[i]
        
if h[n] <= h[n-1]:
    print("No")
    exit()
    
print("Yes")

### FIXED CODE ###

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

prev = -999
for i in range(n):
    if prev <= h[i]-1: prev = h[i]-1
    elif prev <= h[i]: prev = h[i]
    else:
        print("No")
        exit()

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

x = min(B, C) * 2

y = C - B
if 0 < y <= A:
    xp = y
elif 0 < y:
    xp = A


print(x + xp + 1)
    

### FIXED CODE ###

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

if C <= B:
    print(C + B)
elif B < C <= A+B+1:
    print(C+B)
else:
    print(B*2+A+1)
#import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
#from collections import deque
#import math

def main():
    n, m = map(int, input().split())
    ans = 0
    if n == 3:
        A = [10] * 3
        for i in range(m):
            s, c = map(int, input().split())
            s -= 1
            if A[s] == 10:
                A[s] = c
            elif A[s] != c:
                ans = -1
                break
        if A[0] == 0:
            ans = -1
        if A[0] == 10:
            A[0] = 1
        if A[1] == 10:
            A[1] = 0
        if A[2] == 10:
            A[2] = 0
        if ans == -1: print(-1)
        else: print(str(A[0]) + str(A[1]) + str(A[2]))
    
    if n == 2:
        A = [10] * 2
        for i in range(m):
            s, c = map(int, input().split())
            s -= 1
            if A[s] == 10:
                A[s] = c
            elif A[s] != c:
                ans = -1
                break
        if A[0] == 0:
            ans = -1
        if A[0] == 10:
            A[0] = 1
        if A[1] == 10:
            A[1] = 0
        if ans == -1: print(-1)
        else: print(str(A[0]) + str(A[1]))
    
    if n == 1:
        A = 10
        for i in range(m):
            s, c = map(int, input().split())
            if A == 10:
                A = c
            elif A != c:
                ans = -1
                break
        if A == 10:
            A[0] = 0
        if ans == -1: print(-1)
        else: print(A)
        
        


    
if __name__ == '__main__':
    main()


### FIXED CODE ###

#import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
#from collections import deque
#import math

def main():
    n, m = map(int, input().split())
    ans = 0
    if n == 3:
        A = [10] * 3
        for i in range(m):
            s, c = map(int, input().split())
            s -= 1
            if A[s] == 10:
                A[s] = c
            elif A[s] != c:
                ans = -1
                break
        if A[0] == 0:
            ans = -1
        if A[0] == 10:
            A[0] = 1
        if A[1] == 10:
            A[1] = 0
        if A[2] == 10:
            A[2] = 0
        if ans == -1: print(-1)
        else: print(str(A[0]) + str(A[1]) + str(A[2]))
    
    if n == 2:
        A = [10] * 2
        for i in range(m):
            s, c = map(int, input().split())
            s -= 1
            if A[s] == 10:
                A[s] = c
            elif A[s] != c:
                ans = -1
                break
        if A[0] == 0:
            ans = -1
        if A[0] == 10:
            A[0] = 1
        if A[1] == 10:
            A[1] = 0
        if ans == -1: print(-1)
        else: print(str(A[0]) + str(A[1]))
    
    if n == 1:
        A = 10
        for i in range(m):
            s, c = map(int, input().split())
            if A == 10:
                A = c
            elif A != c:
                ans = -1
                break
        if A == 10:
            A = 0
        if ans == -1: print(-1)
        else: print(str(A))
        
        


    
if __name__ == '__main__':
    main()
X, Y, A, B, C = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
nc = list(map(int, input().split()))

r.sort(reverse=True)
g.sort(reverse=True)
nc.sort(reverse=True)

selected = r[:X] + g[:Y]
selected.sort()

for i in range(C):
  if selected[i] < nc[i]:
    selected[i] = nc[i]
    
print(sum(selected))

### FIXED CODE ###

X, Y, A, B, C = map(int, input().split())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
nc = list(map(int, input().split()))

r.sort(reverse=True)
g.sort(reverse=True)
nc.sort(reverse=True)

selected = r[:X] + g[:Y]
selected.sort()

if len(selected) > len(nc) or len(selected) == len(nc):
  L = len(nc)
else:
  L = len(selected)

for i in range(L):
  if selected[i] < nc[i]:
    selected[i] = nc[i]
    
print(sum(selected))
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
# スペース区切りの整数の入力
b = int(input())

# 出力
print(a*b)

### FIXED CODE ###

a,b = map(int,input(). split())
print(a*b)
Suji=[]
for i in range(1,9):
  Suji.append(i)
N = int(input())
Suji_check=False
for s in Suji:
  A = N%s
  try A != 0:
      for t in Suji:
      if A == t:
        Suji_check = True
  except:
    pass
if Suji_check:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

N = int(input())
Suji_check = False
for s in range(1,10):
  for t in range(1,10):
    if s*t == N:
      Suji_check = True
      break
if Suji_check:
  print('Yes')
else:
  print('No')
n = input()
a = [0] * 100000
for i in xrange(n):
	l, r = [int(x) for x in raw_input().split()]
	if l == r:
		a[l] = 1
		continue
	a[l:r + 1] = [1] * (r - l + 1)
print a.count(1)

### FIXED CODE ###

n = input()
a = [0] * 100010
for i in xrange(n):
	l, r = [int(x) for x in raw_input().split()]
	a[l:r + 1] = [1] * (r - l + 1)
print a.count(1)
N,M = map(int,input().split())
hint_list = [list(map(int,input().split())) for i in range(M)]
friend_list = []

def get_unique_list(seq):
    seen = []
    return [x for x in seq if x not in seen and not seen.append(x)]

hint_list = get_unique_list(hint_list)

if M == 0:
    print(N)
else:
    friend_list.append(hint_list[0])
    for i in range(1,len(hint_list)):
        for j in range(len(friend_list)):
            if hint_list[i][0] in friend_list[j]:
                if hint_list[i][1] in friend_list[j]:
                    pass
                else:
                    frined_list[j].append(hint_list[i][1])
            elif hint_list[i][1] in friend_list[j]:
                if hint_list[i][0] in friend_list[j]:
                    pass
                else:
                    frined_list[j].append(hint_list[i][0])
            else:
                pass

    friend_length = []

    for i in range(len(friend_list)):
        friend_length.append(len(friend_list[i]))

    print(max(friend_length))

### FIXED CODE ###

from collections import deque
 
N,M = map(int,input().split())
hint_list = [list(map(int,input().split())) for i in range(M)]

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x -= 1
        y -= 1
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

uf = UnionFind(N)
for i in range(len(hint_list)):
    uf.union(hint_list[i][0],hint_list[i][1])
    
print(-min(uf.parents))
def sunuke_sum(arg):
    sum_digit = 0
    for char in arg:
        sum_digit += int(char)
    return sum_digit


input_num = int(input())

sunuke_list = []
min_sunuke_div = 10 ** 15
for d in reversed(range(1, 14)):
    for n in reversed(range(10, 100)):
        i = n * (10 ** d) + (10 ** d - 1)
        sunuke_div = i / sunuke_sum(str(i))
        if min_sunuke_div >= sunuke_div:
            sunuke_list.append(i)
            min_sunuke_div = sunuke_div

for i in reversed(range(1, 101)):
    sunuke_div = i / sunuke_sum(str(i))
    if min_sunuke_div >= sunuke_div:
        sunuke_list.append(i)
        min_sunuke_div = sunuke_div

sunuke_list.reverse()

for i in range(0, input_num):
    print(sunuke_list[i])


### FIXED CODE ###

def sunuke_sum(arg):
    sum_digit = 0
    for char in arg:
        sum_digit += int(char)
    return sum_digit


input_num = int(input())

sunuke_dict = {}

min_sunuke_div = 10 ** 20
for d in reversed(range(1, 16)):
    for n in reversed(range(10, 1000)):
        i = n * (10 ** d) + (10 ** d - 1)
        sunuke_div = i / sunuke_sum(str(i))
        sunuke_dict[i] = sunuke_div

for i in reversed(range(1, 101)):
    sunuke_div = i / sunuke_sum(str(i))
    sunuke_dict[i] = sunuke_div

sunuke_sorted = sorted(sunuke_dict.items())
sunuke_list = []

for value, div_value in reversed(sunuke_sorted):
    if min_sunuke_div >= div_value:
        sunuke_list.append(value)
        min_sunuke_div = div_value

sunuke_list.reverse()

for i in range(0, input_num):
    print(str(sunuke_list[i]))
n, q = map(int, input().split())
s = input()
for i in range(q):
    tmp = s
    list_q = list(map(int, input().split()))
    tmp = tmp[list_q[0] -1:list_q[1]]
    print(tmp)
    tmp = tmp.split("AC")
    print(len(tmp) - 1)


### FIXED CODE ###

import sys
input = sys.stdin.readline
N, Q = map(int,input().split())
S = list(input())[:-1]
list_Sum = [0]*(N+1)
for i in range(1, N):
    list_Sum[i+1] = list_Sum[i]
    if S[i-1] == "A" and S[i] == "C":
        list_Sum[i+1] += 1
for i in range(Q):
    l, r = map(int,input().split())
    print(list_Sum[r]-list_Sum[l])
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))[::-1]
A_sum = sum(A)

count = 0;
criteria = A_sum/(4*M)

print("No") if (A[M - 1] < criteria) else print("Yes")


### FIXED CODE ###

inputline = list(map(lambda x:int(x), input().split(" ")))
print(inputline[2], inputline[0], inputline[1])
d,n=map(int,input().split())
if n=100:
  print(100**d*101)
else:
  print(100**d*n)

### FIXED CODE ###

d,n=map(int,input().split())
if n==100:
  print(100**d*101)
else:
  print(100**d*n)
r = input()

print(3*r**2)

### FIXED CODE ###

r = int(input())

print(3*r**2)
import math

N = int(input())
T = [int(input()) for n in range(N)]


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


res = T[0]
for t in T:
    res = lcm(res, t)

print(res)


### FIXED CODE ###

N = int(input())
T = [int(input()) for n in range(N)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


res = T[0]
for t in T:
    res = lcm(res, t)

print(res)
x = str(input())
if x.isupper() == True:
  print(A)
else:
  print(a)

### FIXED CODE ###

x = str(input())
if x.isupper() == True:
  print("A")
else:
  print("a")
from collections import Counter
from math import gcd
a, b = map(int, input().split())
n = int(max(a, b)**(1/2)) + 1
prime_num_cnt = [0]*(n + 1)
prime_num = []
for i in range(2, n+1):
    if prime_num_cnt[i] == 0:
        prime_num.append(i)
        tmp = i
        for j in range(1, n):
            if tmp*j > n:
                break
            prime_num_cnt[tmp*j] = 1


g = gcd(max(a, b), min(a, b))
cnt = Counter()
m = 2
while m*m < g:
    while g % m == 0:
        g //= m
        cnt[m] += 1
    m += 1

print(len(cnt) + 1)


### FIXED CODE ###

from collections import Counter
from fractions import gcd
a, b = map(int, input().split())
n = int(max(a, b)**(1/2)) + 1

g = gcd(a, b)
cnt = Counter()
m = 2
while m*m<= g:
    while g % m == 0:
        g //= m
        cnt[m] += 1
    m += 1
if g > 1:
    cnt[g] += 1

print(len(cnt) + 1)
a,b,c=list(map(int,input.split('/')))
if b>4:
  print('TBD')
else:
  print('Heisei')

### FIXED CODE ###

a,b,c=list(map(int,input().split('/')))
if b>4:
  print('TBD')
else:
  print('Heisei')
N = int(input())
A = list(map(int,input().split()))

dif = [0] * (N-1)
for i in range(1,N): dif[i-1] = A[i] - A[i-1]

ans = 1
t = dif[0]
for i in range(N-1):
    if dif[i]*t < 0:
        ans += 1
        if i < N-2:
            t = dif[i+1]
print(ans)

### FIXED CODE ###

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

dif = [0] * (N-1)
for i in range(1,N): dif[i-1] = A[i] - A[i-1]

ans = 1
t = 0
i = 0
for d in dif:
    if t == 0:
        t = d
    elif d*t < 0:
        ans += 1
        t = 0
print(ans)
def Ics(X, Y):
    m = len(X)
    n = len(Y)
    maxl = 0
    for i in range(m + 1):
        c[i][0] = 0
    for j in range(1, n + 1):
        c[0][j] = 0
    for i in range(1, m + 1):
        for j in range(1, n + 1):
            if(X[i] == Y[j]):
                c[i][j] = c[i - 1][j - 1] + 1
            elif(c[i - 1][j] <= c[i][j - 1]):
                c[i][j] = c[i- 1][j]
            maxl = max(maxl, c[i][j])
    return maxl

q = int(input().rstrip())
t = []
for i in range(n):
    s1 = input().rstrip()
    s2 = input().rstrip()
    t.append(Ics(s1, s2))
print(*t, sep="\n")

### FIXED CODE ###

def Ics(X, Y):
    m = len(X)
    n = len(Y)
    c1 = [0] * (n + 1)
    for i in range(m):
        d = X[i]
        c2 = c1[:]
        for j in range(n):
            if (d == Y[j]):
                c1[j + 1] = c2[j] + 1
            elif (c1[j + 1] < c1[j]):
                c1[j + 1] = c1[j]
    return (c1[-1])

q = int(input().rstrip())
t = []
for i in range(q):
    s1 = input().rstrip()
    s2 = input().rstrip()
    t.append(Ics(s1, s2))
print(*t, sep = "\n")
n = int(input())
r = [0] * (n - 1)
for i in range(n - 1):
  r[i] = (i + 1) % (i + 2)
print(sum(r))

### FIXED CODE ###

n = int(input())
print(n * (n - 1) // 2)
N = int(input())
A = list(map(int, input().split()))

def gcd(x, y):
    if x == 0 or y == 0:
        return max(x, y)
    if y == 0:
        return x
    return gcd(y, x % y)

from functools import lru_cache
@lru_cache(maxsize = 10005)

def L(x):
    if x <= 0:
        return 0
    else:
        return gcd(L(x-1), A[x-1])

def R(x):
    if x >= N - 1:
        return 0
    else:
        return gcd(A[x+1], R(x+1))

w = 1
for i in range(N):
    w = max(w, gcd(L(i), R(i)))

print(w)

### FIXED CODE ###

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

def gcd(x, y):
    if x == 0 or y == 0:
        return max(x, y)
    g = x % y
    if g == 0:
        return y
    return gcd(y, g)

R = [0] * N
R[N-1] = w = 0
for i in range(N-2, -1, -1):
    R[i] = w = gcd(w, A[i+1])

L = [0] * N
L[0] = w = 0
for i in range(1, N):
    L[i] = w = gcd(w, A[i-1])

w = 1
for i in range(N):
    w = max(w, gcd(L[i], R[i]))

print(w)
N = int(input())

list = []
for i in range(N) :
    a = input()
    list.append(a)

list.sort()

print(int(list[N-1])-int(list[0]))


### FIXED CODE ###

input()
a = sorted(map(int, input().split()))
print(a[-1]-a[0])
a,b=map(int,input().split)
print(a+b/2)

### FIXED CODE ###

a,b=map(int,input().split())
print(int(a+b/2))
import math
n = int(input())

a = []
m = amth.floor(a**(1/2))
for i in range(1,m + 1):
    if n % i == 0:
        a.append(i + (n/i) - 2)

print(int(min(a)))


### FIXED CODE ###

import math
n = int(input())

a = []
m = math.floor(n**(1/2))
for i in range(1,m + 1):
    if n % i == 0:
        a.append(i + (n/i) - 2)

print(int(min(a)))
a,b = map(int,input())
ans = (a+b)%24
print(ans)

### FIXED CODE ###

a,b = map(int,input().split())
ans = (a+b)%24
print(ans)
# -*- coding: utf-8 -*-
from itertools import combination_with_replacement

n = int(input())
print(len(list(combination_with_replacement(n, 3))))


### FIXED CODE ###

# -*- coding: utf-8 -*-
import itertools
n = int(input())
print(len(list(itertools.product(range(1,n+1), repeat=3))))
import numpy as np
from collections import Counter

H, W, M = [int(n) for n in input().split()]
h = []
w = []
table = np.zeros((H, W))
for m in range(M):
    tmp = [int(n) for n in input().split()]
    h.append(tmp[0])
    w.append(tmp[1])
    table[tmp[0]][tmp[1]] = 1

h_counter = Counter(h)
w_counter = Counter(w)

most_common_h_list = []
most_common_w_list = []

most_common_h_count = 0
for k, v in h_counter.most_common():
    if v < most_common_h_count:
        break
    most_common_h_list.append(k)
    most_common_h_count = v

most_common_w_count = 0
for k, v in w_counter.most_common():
    if v < most_common_w_count:
        break
    most_common_w_list.append(k)
    most_common_w_count = v

ans = 0
finished = False
for hh in most_common_h_list:
    if finished:
        break
    for ww in most_common_w_list:
        if table[hh][ww] == 1:
            tt = most_common_h_count + most_common_w_count - 1
            if tt > ans:
                ans = tt
        else:
            tt = most_common_h_count + most_common_w_count
            if tt > ans:
                ans = tt
            break
            finished = True
            break

print(ans)


### FIXED CODE ###

H, W, M = [int(n) for n in input().split()]
H_freq = [0] * H
W_freq = [0] * W

table = []
for m in range(M):
    h, w = [int(n)-1 for n in input().split()]
    H_freq[h] += 1
    W_freq[w] += 1
    table.append((h, w))

max_h = max(H_freq)
max_w = max(W_freq)
most_freqent_h = [i for i, h in enumerate(H_freq) if h == max_h]
most_freqent_w = [i for i, w in enumerate(W_freq) if w == max_w]

count = 0
for (h, w) in table:
    if H_freq[h] == max_h and W_freq[w] == max_w:
        count += 1

if count < len(most_freqent_h) * len(most_freqent_w):
    print(max_h + max_w)
else:
    print(max_h + max_w - 1)