Harryxun/stf_run huggingface dataset:
N, K = map(int,input().split())
H = list(input().split())
 
if K >= N:
    print(0)
elif N > K:
    if K == 0:
        print(sum(int(i) for i in H))
    else:
      	# ここを追加
      	for i in range(k):
        	H.remove(max(H))
        print(sum(int(i) for i in H))

### FIXED CODE ###

n,k = map(int,input().split())
h_L = list(map(int,input().split()))
h_L.sort(reverse=True)
if k ==0:
    print(sum(h_L))
else:
    print(sum(h_L[k:]))
N=int(input())
A=list(map(int,input().split()))
pbox=[]
nbox=[]
if 0 in A:
  count=0
  for i in A:
    count += abs(i)
  print(count)
else:
  for i in a:
    if i > 0:
      pbox.append(i)
    else:
      nbox.append(i)
  if len(nbox)%2==0:
    count=0
    for i in a:
      count += abs(i)
    print(count)
  else:
    box=[]
    for i in a:
      box.append(abs(i))
    mi=min(box)
    count=0
    for i in a:
      count += abs(i)
    print(count-2*mi)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
pbox=[]
nbox=[]
if 0 in A:
  count=0
  for i in A:
    count += abs(i)
  print(count)
else:
  for i in A:
    if i > 0:
      pbox.append(i)
    else:
      nbox.append(i)
  if len(nbox)%2==0:
    count=0
    for i in A:
      count += abs(i)
    print(count)
  else:
    box=[]
    for i in A:
      box.append(abs(i))
    mi=min(box)
    count=0
    for i in A:
      count += abs(i)
    print(count-2*mi)
X, Y = map(str, input().split())
l = [A, B, C, D, E, F]

if l.index(X) == l.index(y):
  print('=')
elif l.index(X) < l.index(y):
  print('<')
else:
  print('>')

### FIXED CODE ###

X, Y = map(str, input().split())
l = ['A', 'B', 'C', 'D', 'E', 'F']
 
if l.index(X) == l.index(Y):
  print('=')
elif l.index(X) < l.index(Y):
  print('<')
else:
  print('>')
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A

#B

#C
"""
x = I()
ans = 2*(x//11)+1
x %= 11
if x == 0:
    ans -= 1
if x > 6:
    ans += 1
print(ans)
"""

#D
n = I()
a = LI()
d = defaultdict(int)
for i in a:
    d[i] += 1
l = list(d.keys())
i = 0
while i < len(l):
    if d[l[i]] < 2:
        l.pop(i)
        i -= 2
    i += 1
    if len(l) == 0:break
l.sort()
k = 0
for i in l:
    k ^= ~(d[i]%2)
    d[i] = 1
ans = sum(list(d.values()))
ans -= 1 if k%2 else 0
print(ans)
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T


### FIXED CODE ###

#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A

#B

#C
"""
x = I()
ans = 2*(x//11)+1
x %= 11
if x == 0:
    ans -= 1
if x > 6:
    ans += 1
print(ans)
"""

#D
n = I()
a = LI()
d = defaultdict(int)
for i in a:
    d[i] += 1
l = list(d.keys())
i = 0
while i < len(l):
    if d[l[i]] < 2:
        l.pop(i)
        i -= 1
    i += 1
l.sort()
k = 0
for i in l:
    k ^= ~(d[i]%2)
    d[i] = 1
ans = sum(list(d.values()))
ans -= 1 if k%2 else 0
print(ans)
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T
S = input()
N = len(S)
dp = [0 for i in range(N)]
last = [False for i in range(N)]
last[0] = S[0]
for i in range(1, N):
    if last[i-1][-1] != S[i]:
        dp[i] = dp[i-1] + 1
        if i >= 2:
            last[i] = last[i-2]
    else:
        dp[i] = dp[i-1]
        last[i] = last[i-1] + S[i]
print(dp[N-1]*2)

### FIXED CODE ###

S = input()
zero = S.count('0')
one = S.count('1')
print(min(zero, one) * 2)
house = {1:[[0 for i in range(10)] for j in range(3)], 2:[[0 for i in range(10)] for j in range(3)],
         3:[[0 for i in range(10)] for j in range(3)], 4:[[0 for i in range(10)] for j in range(3)]}
n = int(input())
for i in range(n):
    building, floor, room, people_numbers = [int(j) for j in input().split()]
    house[building][floor - 1][room - 1] = people_numbers

partition = "#"*20
for i in range(4):
    for j in range(3):
        print(" "+ *house[i + 1][j])
        if j == 2 and i != 3: print(partition)

### FIXED CODE ###

house = {1:[[0 for i in range(10)] for j in range(3)], 2:[[0 for i in range(10)] for j in range(3)],
         3:[[0 for i in range(10)] for j in range(3)], 4:[[0 for i in range(10)] for j in range(3)]}
n = int(input())
for i in range(n):
    building, floor, room, people_numbers = [int(j) for j in input().split()]
    house[building][floor - 1][room - 1] += people_numbers

partition = "#"*20
for i in range(4):
    for j in range(3):
        tmp_list = [str(tmp) for tmp in house[i + 1][j]]
        print(" {}".format(" ".join(tmp_list)))
        if j == 2 and i != 3: print(partition)
import sys
read = sys.stdin.buffer.read
input = sys.stdin.readline
input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

def main():
	a,b=MI()
	print(a*b)


if __name__ == "__main__":
	main()


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
input = sys.stdin.readline
input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

def main():
	n=II()
	A=LI()

	ans=1
	A.sort()
	for i in range(n):
		ans*=A[i]
		if ans>10**18:
			print(-1)
			exit(0)

	print(ans)


if __name__ == "__main__":
	main()
S=int(input())
W=int(input())
if S>W:
  print("safe")
else:
  print("unsafe")

### FIXED CODE ###

S,W=map(int,input().split())
if S>W:
  print("safe")
else:
  print("unsafe")
n = int(input())
a = list(map(int,input().split()))

if 0 in a:
    print(0)
    return
ans = 1
for i in a:
    ans *= i
    if ans >1000000000000000000:
        print(-1)
        return
    print(ans)


### FIXED CODE ###

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

if 0 in a:
    print(0)
    exit()
ans = 1
for i in a:
    ans *= i
    if ans > 10**18:
        ans = -1
        break
print(ans)
hist = [0 for i in range(100)]

l = []
while True:
  try:
    hist[input() - 1] += 1
  except:
    break;

for k in filter(lambda x: max(hist) == x[1], enumlate(hist)):
  print k[0] + 1

### FIXED CODE ###


hist = [0 for i in range(100)]

l = []
while True:
  try:
    hist[input() - 1] += 1
  except:
    break;

for k in filter(lambda x: max(hist) == x[1], enumerate(hist)):
  print k[0] + 1
import math
n,k=map(int, input().split()) 
lst=list()

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1, k+1):
    if n-k>i:
        lst.append(combinations_count(n-k+1, i) * combinations_count(k-i+(i-1), i-1))
    
    if n-k==i:
        lst.append(combinations_count(K-1,i-1))

for i in range(k):
    print(lst[i]%(10**9+7))

### FIXED CODE ###

import math
n,k=map(int,input().split()) 

def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

mod_num = 10 ** 9 + 7
for i in range(1, k+1):
    if i > n - k + 1:
        print(0)
    else:
        print(comb(n-k+1, i) * comb(k-i+(i-1), i-1) % mod_num)
while True:
    n=input()
    if n==0:
        break
    m,goal,d=input(),input(),input()
    step=[""]*d
    for i in xrange(d):
        step[i]=raw_input()
    raw=range(1,n+1)
    for i in xrange(d):
        for j in xrange(n-1):
            if step[i][j]=="1":
                raw[j],raw[j+1]=raw[j+1],raw[j]
    ans=0
    if not raw[goal]==m:
        t=raw[goal]
        raw=range(1,n+1)
        for i in xrange(d):
            if not ans==0:break
            for j in xrange(n-1):
                if (raw[j]==m and raw[j+1]==t) or (raw[j+1]==m and raw[j]==t):
                    if (j-1<0 or step[i][j-1]=="0") and (j+1>=n or step[i][j+1]):
                        ans=(i+2,j+1)
                        break
                if step[i][j]=="1":
                    raw[j],raw[j+1]=raw[j+1],raw[j]
        if ans==0:
            ans=1
    print " ".join(map(str,ans))

### FIXED CODE ###

while True:
    n=input()
    if n==0:
        break
    m,goal,d=input(),input(),input()
    step=[""]*d
    for i in xrange(d):
        step[i]="0"+raw_input()+"0"
    raw=range(n+2)
    for i in xrange(d):
        for j in xrange(1,n+1):
            if step[i][j]=="1":
                raw[j],raw[j+1]=raw[j+1],raw[j]
    ans=0
    if not raw[goal]==m:
        e=raw[goal]
        raw=range(n+2)
        for i in xrange(d):
            if not ans==0:
                break
            for j in xrange(1,n+1):
                if (raw[j]==m and raw[j+1]==e) or (raw[j]==e and raw[j+1]==m):
                    if step[i][j-1]=="0" and step[i][j]=="0" and step[i][j+1]=="0":
                        ans=(i+1,j)
                        break
                if step[i][j]=="1":
                    raw[j],raw[j+1]=raw[j+1],raw[j]
        if ans==0:
            ans=1
    if ans==0 or ans==1:print ans
    else:print " ".join(map(str,ans))
import sys

sys.setrecursionlimit(10**9)

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

g = [[] for i in range(n+1)]

dp = [-1] * (n+1)
for _ in range(m):
    v1 , v2 = map(int,input().split())
    g[v1].append(v2)
    
# finding longest path for vertice i
def dfs(i):
    if dp[i]!=-1:
        return dp[i]
    temp = 0
    for nv in g[i]:
        temp = max(temp, dfs(nv)+1)

    dp[i]=temp
    return temp
  
# finding overall longest path  
res = 0  
for i in range(1,n+1):
    res = max(res, dfs(i))
print(res)

### FIXED CODE ###

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

dis = [0] * n
dis[1] = abs(height[1] - height[0])
    
for i in range(2,n):
    dis[i] = min(dis[i-2] + abs(height[i] - height[i-2]), dis[i-1] + abs(height[i] - height[i-1]))

print(dis[-1])
a = input()
b = input()
c = input()
x = input()
count = 0
for i in range(min(x // 500, a) + 1):
    for j in range(min((x - i * 500) // 100, b) + 1):
        if (x - i * 500 - j * 100) // 50 <= c:
            count += 1
print(count)


### FIXED CODE ###

a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(min(x // 500, a) + 1):
    for j in range(min((x - i * 500) // 100, b) + 1):
        if x - i * 500 - j * 100 <= c * 50:
            count += 1
print(count)
a, b, c, d = map(int, input().split())
l = a+b
r = c+d
print("Left" if l > r "Right" elif l < r else "Balanced")

### FIXED CODE ###

a, b, c, d = map(int, input().split())
l = a+b
r = c+d
if l > r:
  print("Left")
elif l < r:
  print("Right")
else:
  print("Balanced")
nk = list(map(int,input().split()))
h = np.array(list(map(int,input().split())))
n,k = nk[0], nk[1] #5,3
DP = np.zeros(n, int)
#DP[0] = 0
for i in range(1, n):#0~3 -> 1~4
  act = float("inf")
  for k_ in range(1, k+1):#0~2 -> 1~3
    if i-k_ < 0 : continue
    act = min(DP[i-k_] + abs(h[i-k_]-h[i]), act)#
  DP[i] = act#[0,20,]
print(DP[-1])

### FIXED CODE ###

N, K = map(int, input().split())
h = list(map(int, input().split()))
 
DP = [0]
for i in range(N-1):
    act = float("inf")
    for k in range(K):
        if i-k < 0 : continue
        act = min(DP[-1-k] + abs(h[i-k]-h[i+1]) , act)
    DP += [act]
 
print(DP[-1])
N = int(input())
l = list(range(1, N+1))

ans = 0
for i in range(N):
  if i == N-1:
    ans += l[i] % 1
  else: ans += l[i] % (l[i] + 1)
print(ans)

### FIXED CODE ###

N = int(input())
print((N * (N-1)) //2)
N, M, K = int(input().split())
a_timelist = int(input().split())
b_timelist = int(input().split())
counta = len(a_timelist)
countb = len(b_timelist)
time = 0
a, b = [0], [0]
for i in range(N):
  a.append(a[i] + a_timelist[i])
for i in range(M):
  b.append(b[i] + b_timelist[i])
ans, j = 0, M
for i in range(N+1):
  if a[i] > K:
    break
  while b[i] > K -a[i]:
    j -= 1
  ans = max(ans, i + j)
print(ans)

### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(N):
  a.append(a[i] + A[i])
for i in range(M):
  b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
  if a[i] > K:
    break
  while b[j] > K - a[i]:
    j -= 1
  ans = max(ans, i + j)
print(ans)
lis = [input() for _ in range(3)]
len = [len(lis[i]) for _ in range(3)]
idx = [0,0,0]
name = ['a','b','c']

turn = 0
while 1:
  if len[turn] <= idx[turn]:
    print(name[turn])
    exit()
  else:
    turn = lis[turn][idx[turn]]
    idx[turn] += 1

### FIXED CODE ###

lis = [input() for _ in range(3)]
len = [len(lis[i]) for i in range(3)]
idx = [0,0,0]
name = ['A','B','C']

turn = 0
while 1:
  if len[turn] <= idx[turn]:
    print(name[turn])
    exit()
  else:
    tmp = ord(lis[turn][idx[turn]])-ord('a')
    idx[turn] += 1
    turn = tmp
A,B = map(int,input().split())

if B%A = 0 :
	print(int(A+B)
else :
	print(int(B-A))

### FIXED CODE ###

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

if B%A == 0 :
	print(A+B)
else :
	print(B-A)
N, Y = list(map(int, input().split()))

# Y = 10000*x + 5000*y + 1000*z
# N = x + y + z
flag = 0
x = 0
y = 0
z = 0

if Y % 1000 != 0:
   flag = 1
elif Y > 10000*N:
   flag = 1
elif Y % 10000 == 0:
   x = Y//10000
else :
   x = Y//10000
   while True:
      for y in range(N-x+1):
         z = N-x-y
         if Y == 10000*x + 5000*y + 1000*z:
            flag = -1
            break
      if flag == -1:
         break
      elif x ==0:
         flag = 1
         break
      x = x-1
      
            

if flag == 1:
   print("-1 -1 -1")

else :
   print(str(x)+" "+str(y)+" "+str(z))

### FIXED CODE ###

S = input()

print("2018" + S[4:])
N = int(input())
A_lst = [int(x) for x in input().split()]
B_lst =[]
for i in range(N - 1):
    B_lst.append(A_lst[i + 1] - A_lst[i])

def my_sign(n):
    return (n > 0) - (n < 0)

cnt = 1
i = 0
pm = my_sign(B_lst[0])
while True:
    if i >= len(B_lst) - 1:
        break
    else:
        if my_sign(B_lst[i + 1]) == 0:
            i += 1
            continue
        elif pm == my_sign(B_lst[i + 1]) or pm == 0:
            pm = my_sign(B_lst[i + 1])
            i += 1
            continue
        else:
            cnt += 1
            pm = my_sign(B_lst[i + 1])
            i +=2
print(cnt)


### FIXED CODE ###

def main():
    N = int(input())
    lst = [int(_) for _ in input().split()]
    last = lst[0]
    A = [last]
    for i in range(1, N):
        if lst[i] == last: continue
        last = lst[i]
        A.append(lst[i])
    left = right = output = 0
    while left < len(A):
        if left == len(A)-1:
            output += 1
            break
        if A[left+1] - A[left] > 0:
            while right < len(A)-1 and A[right] < A[right+1]:
                right += 1
        elif A[left+1] - A[left] < 0:
            while right < len(A)-1 and A[right] > A[right+1]:
                right += 1
        output += 1
        left = right + 1
        right = left
    print(output)
    return

if __name__ == '__main__':
    main()
n=int(input())
a=[]
for i in range(n)
    p=int(input())
    a.append(p)
a.sort()
a[n-1]=int(a[n-1]/2)
print(sum(a))

### FIXED CODE ###

n=int(input())
a=[]
for i in range(n):
    p=int(input())
    a.append(p)
a.sort()
a[n-1]=int(a[n-1]/2)
print(sum(a))
r = input()
print(3*r**2)

### FIXED CODE ###

r = int(input())

print(3*r**2)
N, K = map(int,input().split())
p = list(map(int,input().split()))

#累積和を前計算
sum_list = [0 for _ in range(300000)]
sum = 0

for i in range(len(p)):
    sum += p[i]
    sum_list[i] = sum

#答えを計算
mev = 0
idx = 0
for i in range(N-K+1):
    ev = sum_list[i+K]-sum_list[i]
    if ev > mev:
        idx = i
        mev = ev

mev = 0
for i in range(idx+1,idx+1+K):
    mev += (p[i] + 1.0) / 2.0

print(mev)

### FIXED CODE ###

N, K = map(int,input().split())
p = list(map(int,input().split()))

#累積和を前計算
sum_list = [0 for _ in range(300000)]
sum = 0

for i in range(len(p)):
    sum += p[i]
    sum_list[i] = sum

#答えを計算
mev = 0
idx = 0
for i in range(N-K+1):
    ev = sum_list[i+K]-sum_list[i]
    if ev > mev:
        idx = i
        mev = ev

mev = 0.0
if N != K:
    for i in range(idx+1,idx+1+K):
        mev += (p[i] + 1.0) / 2.0

else:
    for i in range(len(p)):
        mev += (p[i] + 1.0) / 2.0

print(mev)
from collections import deque
S = deque(list(input().strip()))
Q = int(input())
cnt = 0
for _ in range(Q):
    q = list(input().split())
    if int(q[0])==1:
        cnt += 1
    else:
        if cnt%2==0:
            if int(q[1])==1:
                S.appendleft(q[2])
            else:
                S.append(q[2])
        else:
            if int(q[1])==1:
                S.append(q[2])
            else:
                S.appendleft(q[2])
if cnt%2==0:
    print("".join(S))
else:
    S = S[::-1]
    print("".join(S))

### FIXED CODE ###

from collections import deque
S = deque(list(input().strip()))
Q = int(input())
cnt = 0
for _ in range(Q):
    q = list(input().split())
    if int(q[0])==1:
        cnt += 1
    else:
        if cnt%2==0:
            if int(q[1])==1:
                S.appendleft(q[2])
            else:
                S.append(q[2])
        else:
            if int(q[1])==1:
                S.append(q[2])
            else:
                S.appendleft(q[2])
if cnt%2==0:
    print("".join(S))
else:
    S.reverse()
    print("".join(S))
N, M = map(int, input().split())

v_neighbor = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    v_neighbor[a-1].append(b-1)
    v_neighbor[b-1].append(a-1)


v_visit = [False for _ in range(N)]

def search(n):
    count = 0
    for n_ in v_neighbor[n]:
        if not v_visit[n_]:
            v_visit[n_] = True
            count += 1
            count += search(n_)
    return count

res = 0
for i in range(N):
    if v_visit[i]:
        continue
    search_res = search(i)
    res = max(res, search_res)


print(res)


### FIXED CODE ###

import sys

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

sys.setrecursionlimit(10**7)

v_neighbor = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    v_neighbor[a-1].append(b-1)
    v_neighbor[b-1].append(a-1)


v_visit = [False for _ in range(N)]

def search(n):
    count = 0
    for n_ in set(v_neighbor[n]):
        if not v_visit[n_]:
            v_visit[n_] = True
            count += 1
            count += search(n_)
    return count

res = 1
for i in range(N):
    if v_visit[i]:
        continue
    search_res = search(i)
    res = max(res, search_res)


print(res)
a,b,c,d=list(map(int,input().split()))
if a>=0 and c>=0:
    one=b
    two=d

elif a<0 and c<0:
    one=a
    two=c

elif a>=0 and c<0:
    one=a
    two=d
else:
    one=b
    two=c


print(one*two)

### FIXED CODE ###

x=int(input())
if x==0:
    print(1)
else:
    print(0)
from collections import Counter
from functools import reduce
from operator import mul
 
N,P = map(int,input().split())
i = 2
 
table = []
 
while i * i <= P:
 
  while P % i == 0:
 
    P /= i
 
    table.append(i)
 
  i += 1
 
 if P > 1:
 
  table.append(P)
 
            
c = Counter(table)
 
temp = [i[0] for i in c.items() if i[1] >= N]
 
temp.append(1)
 
print(int(reduce(mul,temp)))

### FIXED CODE ###

N,P = map(int,input().split())
i = round(P**(1/N))
res = []
if N == 1:
  print(P)
elif P == 1:
  print(1)
else:
  for i in range(i,0,-1):
    if P%i**N==0:
      print(i)
      break
N,R = map(int,input().split())
print(R if N >= 10 else R+100*(10-K))

### FIXED CODE ###

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

print(R if N >= 10 else R + 100*(10-N))
n, time = map(int, input().split())
list = []
list_ok = []
for i in range(n):
    c, t = map(int, input().split())
    object = [c, t]
    list.append(object)

for j in range(n):
    if list[j][1] > time:
        continue
    else:
        list_ok.append(list[j][0])

ans = min(list_ok)

print(ans)


### FIXED CODE ###

n, time = map(int, input().split())
list = []
list_ok = []

for i in range(n):
    c, t = map(int, input().split())
    object = [c, t]
    list.append(object)
    
count = 0

for j in range(n):
    if list[j][1] > time:
        continue
    else:
        list_ok.append(list[j][0])
        count += 1

if count == 0:
    print("TLE")
else:
    ans = min(list_ok)
    print(ans)
# D - Good Grid

from collections import defaultdict
import itertools

N, C = map(int, input().split())
D = [[0] * C for _ in range(C)]
for i in range(C):
    D[i] = list(int(d) for d in input().split())

# MOD3の世界で0,1,2ごとに、最初の値の数をカウントしておく
dict_c = [defaultdict(int) for _ in range(3)]
for i in range(N):
    c = list(int(x) for x in input().split())
    for j in range(N):
        dict_c[(i+j)%3][c[j]-1] += 1

# ここからは全探索。
# 0, 1, 2の各配列に対して、全ての色を試す(C**3)
list_C = list(range(C))
ans = 10**18
for (p, q, r) in itertools.permutations(list_C):
    tmp = 0
    for i, j in enumerate((p, q, r)):
        for m, n in dict_c[i].items():
            tmp += D[m][j] * n
    ans = min(ans, tmp)

print(ans)

### FIXED CODE ###

# D - Good Grid

from collections import defaultdict
import itertools

N, C = map(int, input().split())
D = [[0] * C for _ in range(C)]
for i in range(C):
    D[i] = list(int(d) for d in input().split())

# MOD3の世界で0,1,2ごとに、最初の値の数をカウントしておく
dict_c = [defaultdict(int) for _ in range(3)]
for i in range(N):
    c = list(int(x) for x in input().split())
    for j in range(N):
        dict_c[(i+j)%3][c[j]-1] += 1

# ここからは全探索。
# 0, 1, 2の各配列に対して、全ての色を試す(C**3)
list_C = list(range(C))
ans = 10**18
for (p, q, r) in itertools.permutations(list_C, 3):
    tmp = 0
    for i, j in enumerate((p, q, r)):
        for m, n in dict_c[i].items():
            tmp += D[m][j] * n
    ans = min(ans, tmp)

print(ans)
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A,B,C,D = map(int,readline().decode('utf8').rstrip())

print(B-C if B>C else 0)


### FIXED CODE ###

"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B, C, D = map(int, readline().split())

start = max(A, C)
end = min(B, D)
ans = max(0, end - start)
print(ans)
N, A, B = map(int, input().split())

a = "b"*A
b = "r"*B

l = ""
for i in range(1,int(N/(A+B)+1)+1):
    if N - len(l)  > (A+B):
        l = l + a + b
    elif N - len(l) < (A):
        l = l + a

print(l[0:N].count("b"))

### FIXED CODE ###

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

n = N // (A + B)
mod = N % (A + B)
 
if mod >= A:
    print(A * n + A)
else:
    print(A * n + mod)