Harryxun/stf_run huggingface dataset:
a,b = map(int, input().split())

for x in range(0,101):
  calc_a = int(x*0.08)
  calc_b = int(x*0.10)
  if calc_a == a and calc_b == b:
    ans = x
    print(ans)
    break
if ans == -1:
  print(ans)

### FIXED CODE ###

import math
import sys

A, B = list(map(int, input().split()))
for i in range(1001):
  priceA = math.floor(i*1.08)
  priceB = math.floor(i*1.10)
  taxA = priceA - i 
  taxB = priceB - i 
  if taxA == A and taxB == B:
    print(i)
    sys.exit()
print("-1")
print('Odd' if eval(input().replace("",*)%2) else 'Even')

### FIXED CODE ###

print('Odd' if eval(input().replace(" ",'*'))%2 else 'Even')
import numpy as np
N,Q = map(int,input().split())
ans = np.array([0]*N)
test = np.array([1]*N)
test = np.diag(test)
p = []
x = []
for i in range(1,N):
    ai,bi = map(int,input().split())
    test[ai-1,bi-1]+=1
for j in range(Q):
    pj,xj = map(int,input().split())
    p.append(pj)
    x.append(xj)

for k in reversed(range(N)):
    check = np.where(test[k] > 0)
    test[k]+=np.sum(test[check],axis=0)
test = np.where(test > 0,1,0)
for j in range(Q):
    ans += test[p[j]-1]*x[j]
    
print(' '.join(map(str,ans)))

### FIXED CODE ###

N,Q = map(int,input().split())
ans = [0]*N
ab = []
for i in range(1,N):
    ab.append(list(map(int,input().split())))
for j in range(Q):
    pj,xj = map(int,input().split())
    ans[pj-1] += xj
ab.sort()
for i in range(N-1):
    ans[ab[i][1]-1]+=ans[ab[i][0]-1]
print(' '.join(map(str,ans)))
lis = list(map(int, input().split()))
lis2 = list(map(int, input().split()))
n = lis[0]
k = lis[1]
a = []
b = []
for i in range(n):
    if lis2[i] not in a:
        a.append(lis2[i])
        count = 0
        for j in range(i+1,n):
            if lis[j] == lis[i]:
                count += 1
        b.append(count)

if len(b) <= k:
    print(0)
else:
    b.sort()
    b.reserve()
    swap = 0
    for i in range(k,len(b)):
        swap += b[i]
    print(swap)

### FIXED CODE ###

lis = list(map(int, input().split()))
lis2 = input().split()
n = lis[0]
k = lis[1]
d = {}

for i in range(n):
    if lis2[i] not in d.keys():
       d[lis2[i]] = 1
    else:
        d[lis2[i]] += 1 
        
if len(list(d.values())) <= k:
    print(0)
else:
    a = list(d.values())
    a.sort()
    a.reverse()
    swap = 0
    for i in range(k,len(a)):
        swap += a[i]
    print(swap)
a = list(map(int,input().split()))
a.sorted()
print(a[0] + a[1])

### FIXED CODE ###

a = list(map(int,input().split()))
a.sort()
print(a[0] + a[1])
import sys,math,collections,itertools,heapq
input = sys.stdin.readline
def f(n):
    return -1*n

N,K=list(map(int,input().split()))
A = list(map(int,input().split()))
memo = [-1]*(max(A)+1)
memo[0]=0
memo[max(A)]=1
num = max(A)//2
num_upper = max(A)
num_under =0

while True:
    cnt = 0
    tmp = num
    for a in A:
        cnt += math.ceil(a/num)-1
    if cnt <=K:
        memo[num]=1
        num_upper = num
        num = (num+num_under)//2
    else:
        memo[num]=0
        num_under = num
        num = (num+num_upper)//2
    if memo[tmp] == 0 and memo[tmp+1]==1:
        print(tmp+1)
        exit()
    elif memo[tmp]==1 and memo[tmp]==0:
        print(tmp)
        exit()
        
    


### FIXED CODE ###

import sys,math,collections,itertools,heapq
input = sys.stdin.readline

N,K=list(map(int,input().split()))
A = list(map(int,input().split()))
under=0
upper=max(A)
num = upper//2

while True:
    ans = 0
    if num == 0:
        print(1)
        exit()
    for a in A:
        ans += math.ceil(a/num)-1
    if ans >K:
        under = num
        num = math.ceil((num+upper)/2)
    else:
        upper = num
        num = math.floor((num+under)/2)
    if upper-under ==1:
        print(upper)
        break
# ==================================================-
# 二分探索
# functionを満たす,search_listの最大の要素を出力
# 【注意点】searchリストの初めの方はfunctionを満たし、後ろに行くにつれて満たさなくなるべき
import math
import sys

sys.setrecursionlimit(10 ** 9)


def binary_research(start, end, search_list, function):
    if start == end:
        return search_list[start]
    middle = math.ceil((start + end) / 2)
    if function(search_list[middle], k, a_sum, b_sum):
        start = middle
    else:
        end = middle - 1
    return binary_research(start, end, search_list, function)


# ==================================================-

n, m, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
a_sum = [0]
b_sum = [0]
for book in a:
    a_sum.append(a_sum[-1] + book)
for book in b:
    b_sum.append(b_sum[-1] + book)


def can_read(num, k, a_sum, b_sum):
    min_read_time = 1000000000
    for i in range(max(0, num - m), n + 1):
        a_num = i
        b_num = num - i
        min_read_time = min(min_read_time, a_sum[a_num] + b_sum[b_num])
    if min_read_time <= k:
        return True
    return False


search_list = list(range(n + m + 1))
start = 0
end = n + m

print(binary_research(start, end, search_list, can_read))

### FIXED CODE ###

n,m,k=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

def make_sumlist(book_list):
    sumnum=0
    container=[0]
    for i in book_list:
        container.append(sumnum+i)
        sumnum+=i
    return container

total_a=make_sumlist(a)
total_b=make_sumlist(b)

# print(n,m,k)
# print(total_a)
# print(total_b)


#r個読めるか
def readable(r):
    #全部読んでも無理
    if r>n+m:
        return False
    if r==0:
        return True
    max_book=100000000000
    for a_n in range(max(0,r-m),min(n,r)+1):
        b_n=r-a_n
        # print(a_n,b_n)
        book_sum=total_a[a_n]+total_b[b_n]
        # print(book_sum)
        max_book=min(max_book,book_sum)
    if max_book<=k:
        return True
    return False

def nibuntansaku(start,end):
    if start==end:
        return start
    middle=(start+end)//2+1
    if readable(middle):
        start=middle
    else:
        end=middle-1
    return nibuntansaku(start,end)

print(nibuntansaku(0,k))
N = list(int(input()))
a = set(N)
a = list(a)
if len(a) <= 2:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N = list(input())

if N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:
    print("Yes")
else:
    print("No")
n = input()
a = 0
for i in range(len(n)):
    a += int(n[i])
print(["Yes","No"][int(n)%a])

### FIXED CODE ###

n = input()
a = 0
for i in range(len(n)):
    a += int(n[i])
print(["Yes","No"][min(int(n)%a,1)])
T = list(input())

if T[0] == '?':
    if T[1] == 'D' or T[1] == '?':
        T[0] = 'P'
    if T[1] == 'P':
        T[0] = 'D'

for i in range(len(T)-1):
    if T[i] == '?':
        if T[i+1] == 'D':
            T[i] = 'P'
        if T[i+1] == 'P':
            T[i] = 'D'
        if T[i+1] == '?' and T[i-1] == 'P':
            T[i] = 'D'
        if T[i+1] == '?' and T[i-1] == 'D':
            T[i] = 'P'
if T[-1] == '?':
    T[-1] = 'D'

ans = ''.join(T)
print(ans)

### FIXED CODE ###

T = list(input())

if len(T) == 1:
    if T[0] == '?':
        T[0] = 'D'

else:
    if T[0] == '?':
        if T[1] == 'D' or T[1] == '?':
            T[0] = 'P'
        if T[1] == 'P':
            T[0] = 'D'

    for i in range(len(T)-1):
        if T[i] == '?':
            if T[i+1] == 'D' and T[i-1] == 'P':
                T[i] = 'D'
            if T[i+1] == 'D' and T[i-1] == 'D':
                T[i] = 'P'
            if T[i+1] == 'P':
                T[i] = 'D'
            if T[i+1] == '?' and T[i-1] == 'P':
                T[i] = 'D'
            if T[i+1] == '?' and T[i-1] == 'D':
                T[i] = 'P'

    if T[-1] == '?':
        T[-1] = 'D'

ans = ''.join(T)
print(ans)
str_d = input().replace("SUN","7").replace("MON","6").replace("TUE","5").replace("WED","4").replace("THU","3").replace("FRI","2").replace("SUT","1")
ans = int(str_d)
print(ans)

### FIXED CODE ###

str_d = input().replace("SUN","7").replace("MON","6").replace("TUE","5").replace("WED","4").replace("THU","3").replace("FRI","2").replace("SAT","1")
ans = int(str_d)
print(ans)
N,A = map(int, input().split())
pritn(N/A)

### FIXED CODE ###

N,A = map(int, input().split())
print(N/A)
s = int(input())
if s == 1:
  print(1)
else:
  print(int((1+s)*n/2))
  

### FIXED CODE ###

s = int(input())
if s == 1:
  print(1)
else:
  print(int((1+s)*s/2))
import sys
input = sys.stdin.readline
n,m = map(int, input().split())
print((1900*m + 100*(n − m))*2**m)

### FIXED CODE ###

import sys
input = sys.stdin.readline
n,m = map(int, input().split())
print((1900*m + 100*(n - m))*2**m)
#sを最高のパターンにして，tを最悪のパターンにすればいい
#continueで強制的に次のループへ
s = list(input())
t = list(input())
condition = 0

s.sort()
t.sort()
t.reverse()

if len(s)  == len(t):
    length = len(s)
    pattern == -1
elif len(s) < len(t):
    length = len(s)
    pattern = 0
else:#sのほうが長い時 pattern = 1
    length = len(t)
    pattern = 1

if pattern == -1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] > t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    if condition == 0:
        print("No")
elif pattern == 0:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    
    if condition == 0:
        print("Yes")
elif pattern == 1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
            
    if condition == 0:
        print("No")
        
    



### FIXED CODE ###

#sを最高のパターンにして，tを最悪のパターンにすればいい
#continueで強制的に次のループへ
s = list(input())
t = list(input())
condition = 0

s.sort()
t.sort()
t.reverse()

if len(s)  == len(t):
    length = len(s)
    pattern = -1
elif len(s) < len(t):
    length = len(s)
    pattern = 0
else:#sのほうが長い時 pattern = 1
    length = len(t)
    pattern = 1

if pattern == -1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    if condition == 0:
        print("No")
elif pattern == 0:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
    
    if condition == 0:
        print("Yes")
elif pattern == 1:
    for i in range(length):
        if s[i] == t[i]:
            continue
        elif s[i] < t[i]:
            print("Yes")
            condition =1
            break
        else:
            print("No")
            condition =1
            break
            
    if condition == 0:
        print("No")
import math
N,M = map(int,input().split())
s = input()
t = input()
g = math.gcd(N,M)
l = N*M//g

n = N//g
m = M//g

ans = l

for i in range(g):
    if s[i*n]!=t[i*m]:
        ans = -1
        break
print(ans)

### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
    
N,M = map(int,input().split())
s = input()
t = input()
g = gcd(N,M)
l = N*M//g

n = N//g
m = M//g

ans = l

for i in range(g):
    if s[i*n]!=t[i*m]:
        ans = -1
        break
print(ans)
n,m = map(int,input().split())
print((n-2)*(m-2) if n>1 and m>1 else abs(abs(b-m)-1))


### FIXED CODE ###

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

# 上端
edge_l=1
if m > 1:
    edge_l+=1
if n > 1:
    edge_l+=1
if m > 1 and n > 1:
    edge_l+=1

edge_l = 1 if edge_l%2==1 else 0

edge_c=3
if n > 1:
    edge_c+=3
edge_c = 1 if edge_c%2==1 else 0

edge_row=edge_l
if m>1:
    edge_row+=edge_l
if m>2:
    edge_row+=(m-2)*edge_c

# 中央部
inner_l = 3
if m > 1:
    inner_l+=3
inner_l = 1 if inner_l%2==1 else 0

inner_c=1 # 絶対に裏

inner_row=inner_l
if m>1:
    inner_row+=inner_l
if m>2:
    inner_row+=(m-2)*inner_c

# 合計
total=edge_row
if n>1:
    total+=edge_row
if n>2:
    total+=(n-2)*inner_row
print(total)
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i]-m.count(l[i]) for i in range(len(l))))))

### FIXED CODE ###

n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
n,t = map(int,input().split())
a = list(map(int,input().split()))

ans = t
for i in range(0,n-1):
  ans += min(t, s[i+1] - s[i])
print(ans)

### FIXED CODE ###

n,t = map(int,input().split())
a = list(map(int,input().split()))
 
ans = t
for i in range(n-1):
  ans += min(t, a[i+1] - a[i])
print(ans)
N = int(input())
I = map(int, input().split())
minX = 1000000
for i in range(len(I)):
  minX = min(minX, abs(sum(I[:-i]) - sum(I[-i:]) ) )
  
print(minX)

### FIXED CODE ###

N = int(input())
I = list(map(int, input().split()))
minX = 10000000000
end = I.pop()
sumI = sum(I)
for i in range(len(I)):
  minX = min(minX, abs(sumI - end ) )
  popped = I.pop()
  sumI -= popped
  end += popped
  
print(minX)
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

arr = [A, B, C, D, E]
arr_s = sorted(set(list(map(lambda x: x%10, arr))))
if arr_s[0] == 0:
    mn = arr_s[1]
else:
    mn = arr_s[0]

b = 0
for a in arr:
    b += (a//10)*10
    if a%10 != 0:
        b += 10
ans = b - 10 + mn
print(ans)

### FIXED CODE ###

import numpy as np

a = np.array([int(input()) for _ in range(5)])
aa = np.array(list(map(lambda x: -(-x//10*10), a)))
b = aa-a
ans = sum(aa)-max(b)
print(ans)
N = int(input())
W = list(map(int, input().split())) 

min_diff = 1000
tot_wt = sum(W)
for i in range(2**N):
    i_bit = list(map(int, list(np.binary_repr(i, N))))
    s1= np.dot(i_bit, W)
    s2 = tot_wt - s1
    if min_diff > abs(s1-s2):
        min_diff = abs(s1-s2)
        print(min_diff, i_bit)

### FIXED CODE ###

N = int(input())
W = list(map(int, input().split())) 
min_diff = 1000
for i in range(N):
    s1 = sum(W[0:i+1])
    s2 = sum(W) - s1
    if min_diff > abs(s1-s2):
        min_diff = abs(s1-s2)
print(min_diff)
x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p = sorted(p)[a-x:]
q = sorted(q)[b-y:]
r = sorted(r, reverse=True)

pi = 0
qi = 0
ri = 0
while True:
    if ri > c-1: break
    if pi <= a-1 and qi <= b-1:
        if p[pi] < q[qi]:
            if p[pi] < r[ri]:
                p[pi] = r[ri]
                pi += 1
                ri += 1
            else:
                break
        else:
            if q[qi] < r[ri]:
                q[qi] = r[ri]
                qi += 1
                ri += 1
            else:
                break
    elif pi <= a-1:
        if p[pi] < r[ri]:
            p[pi] = r[ri]
            pi += 1
            ri += 1
        else:
            break
    elif qi <= b-1:
        if q[qi] < r[ri]:
            q[qi] = r[ri]
            qi += 1
            ri += 1
        else:
            break
    else:
        break

print(sum(p)+sum(q))

### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p = sorted(p)[a-x:]
q = sorted(q)[b-y:]
r = sorted(r, reverse=True)

pi = 0
qi = 0
ri = 0
while True:
    if ri > c-1: break
    if pi <= x-1 and qi <= y-1:
        if p[pi] < q[qi]:
            if p[pi] < r[ri]:
                p[pi] = r[ri]
                pi += 1
                ri += 1
            else:
                break
        else:
            if q[qi] < r[ri]:
                q[qi] = r[ri]
                qi += 1
                ri += 1
            else:
                break
    elif pi <= x-1:
        if p[pi] < r[ri]:
            p[pi] = r[ri]
            pi += 1
            ri += 1
        else:
            break
    elif qi <= y-1:
        if q[qi] < r[ri]:
            q[qi] = r[ri]
            qi += 1
            ri += 1
        else:
            break
    else:
        break

print(sum(p)+sum(q))
import string

h = input().split()
for i in range(len(h)):
    for j in range(len(h)-1):
        if int(h[i]) > int(h[j]):
            tmp = h[i]
            h[i] = h[j] 
            h[j] = tmp
print(h[0])
print(h[1])
print(h[2])

### FIXED CODE ###

import string
import sys

#??????????????\????????????ip?????\??????
ip = sys.stdin.readlines()
for i in range(len(ip)):
    ip[i] = int(ip[i].strip("\n"))

#??????3??????????????????
h = [0]*3

#?????????????????????
for i in range(len(ip)):
    for j in range(len(ip)):
        if ip[i] > ip[j]:
            tmp = ip[i]
            ip[i] = ip[j] 
            ip[j] = tmp            

for i in range(3):
    if h != 0:
        print(ip[i])
N,M=map(int,input().split())

L=[[]for i in range(N+1)]
p=[0 for i in range(N+1)]

for i in range(N+M-1):
    a,b=map(int,input().split())
    L[a].append(b)
    p[b]=1
    

for i in range(1,N+1):
    if p[i]==0:
        P=i
#print(P)
p[P]=[0,0]
A=[]
for i in L[P]:
    A.append([i,P,1])
for i in range(10**6):
    if i==len(A):
        break
    else:
        p[A[i][0]]=[A[i][1],A[i][2]]
        for j in L[A[i][0]]:
            A.append([j,A[i][0],A[i][2]+1])
    #print(p)
    #print(A)
for i in range(1,N+1):
    print(p[i][0])

### FIXED CODE ###

import sys
input=sys.stdin.readline
N,M=map(int,input().split())

L=[[]for i in range(N+1)]

I=[0 for i in range(N+1)]
for i in range(N+M-1):
    a,b=map(int,input().split())
    L[a].append(b)
    I[b]+=1
    
#print(L)
#print(I)
P=[-1 for i in range(N+1)]
S=-1
for i in range(1,N+1):
    if I[i]==0:
        P[i]=0
        S=i
        break

B=[]
cnt=0
for i in L[S]:
    if I[i]==1:
        B.append(i)
        P[i]=S
    else:
        I[i]-=1

for i in range(10**6):
    if cnt==len(B):
        break
    for j in L[B[cnt]]:
        if I[j]==1:
            B.append(j)
            P[j]=B[cnt]
        else:
            I[j]-=1
    cnt+=1
for i in range(1,N+1):
    print(P[i])
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])


if not __name__ == '__main__':
    def debug(*v):
        print(*v)


# エントリーポイント
def main():
    N = input(int)
    A = input([int, N])

    count = dd(int)
    for a in A:
        count[a] += 1
    debug(count)
    for a in A:
        ans = 0
        for k, v in count.items():
            temp = v if not k == a else v - 1
            ans += (temp * (temp - 1)) // 2
        print(ans)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()


### FIXED CODE ###

from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])


# エントリーポイント
def main():
    N = input(int)
    A = input([int, N])

    count = dd(int)
    for a in A:
        count[a] += 1
    sum_ = 0
    for k, v in count.items():
        sum_ += (v * (v - 1)) // 2
    for a in A:
        print(sum_ - count[a] + 1)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()
import math

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


N, K = map(int, input().split())
x = combinations_count(N-1, 2)
if x < K:
    print('-1')
    quit()

for i in range(2,N+1):
    print('1', str(i))

hen = x-K
x = 2
y = 3
while hen > 0:
    print(x,y)
    y += 1
    if y > N:
        x += 1
        y = x+1
    hen -= 1

### FIXED CODE ###

import math

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


N, K = map(int, input().split())
if N > 2:
    x = combinations_count(N-1, 2)
else:
    x = 0
if x < K:
    print('-1')
    quit()

h = []
for i in range(2,N+1):
    h.append(('1', str(i)))

hen = x-K
x = 2
y = 3
while hen > 0:
    h.append((x,y))
    y += 1
    if y > N:
        x += 1
        y = x+1
    hen -= 1

print(len(h))
for x,y in h:
    print(x,y)
import numpy as np
L, R = map(int, input().split(" "))
arr = np.array(np.arange(L, R+1))
mod_list = []
min_mod_list = []
if (0 in (arr % 2019)) or (0 in arr):
  print(0)
else:
  for i in arr:
#    index_ = np.extract(i, arr)
    index_ = np.where(arr==i)
    for j in arr[int(index_[0])+1:]:
      mod_list.append(((i * j) % 2019))
    
    min_mod_list.append(min(mod_list))
    del mod_list
    mod_list = []
  
  
  print(min(min_mod_list))

### FIXED CODE ###

import numpy as np

L, R = map(int, input().split(" "))
#L, R = 2020, 4000000000
if R - L > 2019:
    print(0)
else:
    arr = np.array(np.arange(L, R+1))
    mod_list = []
    min_mod_list = []
    
    if (0 in (arr % 2019)) or (0 in arr):
        print(0)
    else:
    
        for i in arr:
            mod_list = []
            index_ = np.where(arr==i)
            if i == arr[-1]:
                break
            
            for j in arr[int(index_[0])+1:]:
                mod_list.append((i * j) % 2019)
     
            min_mod_list.append(min(mod_list))
            if min(mod_list) == 0:
                break
    
    
        print(min(min_mod_list))
s = input()
cnt = 0
ACGT = {"A", "C", "G", "T"}
ANS = []
for i in s:
    if i in ACGT:
        cnt += 1
    elif i not in ACGT:
        ANS.append(cnt)
        cnt = 0
print(max(ANS))

### FIXED CODE ###

s = input()
ans = 0
ACGT = {"A", "C", "G", "T"}
for i in range(len(s)):
    for j in range(i + 1, len(s) + 1):
        if set(s[i:j]) <= ACGT:
            ans = max(ans, len(s[i:j]))
print(ans)
a,b = input().split()
x,y = map(int,input().split())
k = int(input())

if a == k:
  print(x-1,y)
else:
  print(x,y-1)


### FIXED CODE ###

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

if S==U:
    A -= 1
else:
    B -= 1
print(A,B)
CONST_DIVSOR = 998244353
N = int(input())
Ds = list(map(int, input().strip().split()))
counter = [0]*N
for D in Ds:
    counter[D] += 1
total = 0
cnt = 0
prenumi = 0
for i in range(N):
    if i == 0:
        if counter[i] == 1:
            total = 1
            prenumi = 1
            cnt = 1
        else:
            break
    else:
        numi = counter[i]
        if numi != 0:
            case = 1
            for j in range(numi):
                case = (case * prenumi) % CONST_DIVSOR
            total = (total * case) % CONST_DIVSOR
            prenumi = numi
            cnt += numi
        else:
            total = 0
            break
    # print(i,total,prenumi,cnt)
    if cnt >= N:
        break

print(total % CONST_DIVSOR)


### FIXED CODE ###

N = int(input())

print((N-1)//2)