Harryxun/stf_run huggingface dataset:
data=int(input().split
b=data[0]
c=data[1]
d=0
e=0
f=0
for i in range(b):	
	for j in range(b):
         for k in range(b):
         	d=i+j+k
         	if d <=15:
         		e=e+1
         	else:
         		pass
print(e)


### FIXED CODE ###

import sys

data=input().split(' ')
k=int(data[0])
data_1sub=k+1
s=int(data[1])
d=0
e=0
for i in range(data_1sub):
    for j in range(data_1sub):
        d=s-i-j
        if (0 <= d) and (d <= k):
            e=e+1
        else:
            pass
print(e)
def main():

p = 2019
L, R = list(map(int, input().split()))
if (R - L) >= (p -1):
  ans = 0
  print(ans)
else:
  L, R = [x % p for x in [L, R]]
  if L < R:
    ans = L * (L+1)
  else:
    ans = 0
  print(ans)
  
main()


  

### FIXED CODE ###

def main():
  p = 2019
  L, R = list(map(int, input().split()))
  
  if (R - L) >= p:
    ans = 0
    print(ans)
    
  else:
    L, R = L % p, R % p
    ans = 2019 ** 2
    for i in range(L, R + 1):
      for j in range(i+1, R+1):
        tmp = (i * j) % p
        if tmp < ans:
          ans = tmp
    print(ans)
    
main()
n=int(input())
*a_,=map(int, input().split())
import numpy as np
a=np.array(a_)
def invr(x):
    if len(x)<=1:
        return x,0
    m=len(x)
    x1=x[:m//2]
    x2=x[m//2:]
    x11,r1=invr(x1)
    x22,r2=invr(x2)
    x11=x11[::-1]
    x22=x22[::-1]
    rx=[];r=r1+r2
    while x11 and x22:
        if x11[-1]<=x22[-1]:
            rx.append(x11.pop())
        else:
            rx.append(x22.pop())
            r+=len(x11)
    rx+=x11[::-1]
    rx+=x22[::-1]
    return rx,r

def f(m):
    a2=(a>=m)*2-1
    ac=np.cumsum(a2).tolist()
    _,r=invr([0]+ac)
    return n*(n+1)//2-r>=((n+1)*n//2)//2+1



mx=max(a)+1;mn=min(a)
while mx-mn>1:
    md=(mx+mn)//2
    r=f(md)
    if r:
        mn=md
    else:
        mx=md
print(mn)





### FIXED CODE ###

n=int(input())
*a,=map(int, input().split())
def invr(x):
    if len(x)<=1:
        return x,0
    m=len(x)
    x1=x[:m//2]
    x2=x[m//2:]
    x11,res1=invr(x1)
    x22,res2=invr(x2)
    rx=[];res=res1+res2
    l=0;r=0
    while l<m//2 and r<m-(m//2):
        if x11[l]<=x22[r]:
            rx.append(x11[l])
            l+=1
        else:
            rx.append(x22[r])
            r+=1
            res+=m//2-l
    rx+=x11[l:]
    rx+=x22[r:]
    return rx,res

def f(m):
    a2=[(ai>=m)*2-1 for ai in a]
    a3=[0]
    for ai in a2:
        a3.append(a3[-1]+ai)
    _,r=invr(a3)
    return n*(n+1)//2-r>=((n+1)*n//2)//2



mx=max(a)+1;mn=min(a)
while mx-mn>1:
    md=(mx+mn)//2
    r=f(md)
    if r:
        mn=md
    else:
        mx=md
print(mn)
# -*-coding=utf-8-*-
n = int(input))
if n%2:
    n *= 2
print(n)

### FIXED CODE ###

a = int(input())
i=1
if a%2==0 and a%a==0:
  print(a)
else:
 print(a*2)
import math
N = int(input())
T, A = map(int, input().split())
Hs = [int(H) for H in input().split()]
min_diff = math.inf
ans = 0
for i, H in enumerate(Hs):
    T_at_H = T - H*0.006
    diff = abs(A - T_at_H)
    if diff < min_diff:
        min_diff = diff
        ans = i + 1
print(ans)

### FIXED CODE ###

N = int(input())
T, A = map(int, input().split())
Hs = [int(H) for H in input().split()]
min_diff = 10e9
ans = 0
for i, H in enumerate(Hs):
    T_at_H = T - H*0.006
    diff = abs(A - T_at_H)
    if diff < min_diff:
        min_diff = diff
        ans = i + 1
print(ans)
n,k=map(int,input().split())
f=[]
for a in range(0,k):
     for b in range(0,k):
         i=0
         total=0
         while i<n:
           x1,y1,z=map(str,input().split())
           x,y=map(int,[x1,y1])
           l=(abs(x+y-a-b)//k)%2
           if (l==0 and z=="W") or (l==1 and z=="B"):
               total=total+1
               i=i+1
           else:
               i=i+1

         else:
              f.append(max([total,n-total]))
print(max(f))


### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2==0:
     print('Even')
else:
     print("Odd")
N, M, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

A = [0]
B = [0]
if N > 0:
  for i in range(N):
    A.append(A[i] + a[i])
for i in range(M):
  B.append(B[i] + b[i])
  
ans = 0
j = M
for n in range(N + 1):
  while True:
    time = A[n] + B[j]
    if time <= K:
      ans = max(ans, n + j)
      break
    else:
      j -= 1
      if j < 0:
        break
print(ans)

### FIXED CODE ###

N, M, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

A = [0]
B = [0]
for i in range(N):
  A.append(A[i] + a[i])
for i in range(M):
  B.append(B[i] + b[i])
  
ans = 0
j = M
for n in range(N + 1):
  if A[n] > K:
    break
  while B[j] > K - A[n]:
      j -= 1
  ans = max(ans, n + j)
print(ans)
text = input()

if len(text) > 0:
	text1 = text.replace(text[0], "")
	text2 = text1.replace(text1[0], "")

	if len(text) == 4 and len(text1) == 2 and len(text2) == 0:
	  print("Yes")
	else:
	  print("No")
else:
	print("No")


### FIXED CODE ###

text = input()

text1 = text.replace(text[0], "")
try:
	text2 = text1.replace(text1[0], "")
except:
	text2 = "e"

if len(text) == 4 and len(text1) == 2 and len(text2) == 0:
  print("Yes")
else:
  print("No")
N = int(input())
a = sorted([(x + l, x - l) for x, l in (map(int, l.split()) for l in sys.stdin)])

last = a[0][0]
ans = 1

for r, l in a[1:]:
    if last <= l:
        ans += 1
        last = r

print(ans)



### FIXED CODE ###

import sys
N = int(input())
a = sorted([(x + l, x - l) for x, l in (map(int, l.split()) for l in sys.stdin)])

last = a[0][0]
ans = 1

for r, l in a[1:]:
    if last <= l:
        ans += 1
        last = r

print(ans)
N = int(input().split())

print("%d"%((N / 2) * ((N + 1) / 2)))

### FIXED CODE ###

K=int(input())
print((K//2)*((K+1)//2))
import numpy as np

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

A_list = list(map(int, input().split()))

R_list = []

for _ in range(M):
  B, C = map(int, input().split())
  BC_list = [C]*B
  R_list.extend(BC_list)

R_list = np.array(R_list)
R_list = np.sort(R_list)
R_list = R_list[::-1]
R_list = R_list[:N]

A_list = np.array(A_list)
A_list = np.sort(A_list)

short_len = N - len(R_list)

if short_len > 0:
  R_list = np.append(R_list, [0]*short_len)

print(np.sum(np.maximum(A_list,R_list)))

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
from operator import itemgetter
 
N,M = map(int,readline().split())
A = list(map(int,readline().split()))
m = map(int,read().split())
BC = list(zip(m,m))
 
BC.sort(key = itemgetter(1),reverse=True)
 
BC.append((N,-1))
 
change = []
for b,c in BC:
    change += [c] * b
    if len(change) > N:
        break
 
A += change
A.sort()
answer = sum(A[-N:])
print(answer)
n=int(input())
r=100000000000000000000000000000
for i in range(1,int(pow(n,0.5))+1):
  if(n%i==0):
    r=min(r,abs(i-1)+abs(n//i-1))
print(r(


### FIXED CODE ###

n=int(input())
r=100000000000000000000000000000
for i in range(1,int(pow(n,0.5))+1):
  if(n%i==0):
    r=min(r,abs(i-1)+abs(n//i-1))
print(r)
X = int(input())
Y = int(input())
Z = int(input())
A = X
B = Y
C = Z
temp = X
A = Z
C = Y
B = temp
print(A, B, C);

### FIXED CODE ###

X, Y, Z = input().split()
A = X
B = Y
C = Z
temp = A
A = B
B = temp
temp = A
A = C
C = temp

print(A, B, C);
a,b=map(int,input().split())
if a+b >= 10:print('error')
  else:print(a+b)

### FIXED CODE ###

a,b=map(int,input().split())
if (a+b)>=10:print('error')
else:print(a+b)
ans = []
i = 0
for i in range(int(input()):
    now = input()
    if now in ans:
        ans.remove(now)
    else:
        ans.append(now)
print(len(ans))


### FIXED CODE ###

time = int(input())
ans = []
n = 0
for i in range(time):
    ans.append(input())
ans.sort(key=int)
while n+1 < len(ans):
    if ans[n] == ans[int(n + 1)]:
        ans.pop(n)
        ans.pop(n)
    else:
        n += 1
print(len(ans))
N = int(input())
L = []
for i in range(9):
    x = ((N - (N % (10**i))) / (10**i)) % 10
    L.append(x)
if N % sum(L) == 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N = int(input())
L = []
for i in range(10):
    x = ((N - (N % (10**i))) / (10**i)) % 10
    L.append(x)
sn = int(sum(L))
if N % sn == 0:
    print("Yes")
else:
    print("No")
X = int(input())
i = 0
sum = 0
while sum < X:
  i += 1
  sum += i
 print(i)

### FIXED CODE ###

X = int(input())
i = 0
sum = 0
while sum < X:
  i += 1
  sum += i
print(i)
n = input()
digit = n % 10
if(digit == "3"):
  print ("bon")
elif(digit == "0" or digit == "1" or digit == "6" or digit == "8"):
  print ("pon")
else:
  print ("hon")


### FIXED CODE ###

ninput = input() #これはstr型
n = int(ninput) #これでint型に直す
digit = n % 10
if digit == 3:
  print('bon')
elif digit == 0 or digit == 1 or digit == 6 or digit == 8:
  print('pon')
else:
  print('hon')
import math
A,B=map(int,input().split())
print(A*B//math.gcd(A,B))

### FIXED CODE ###

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
A,B=map(int,input().split())
print(A*B//gcd(A,B))
n,q=(map(int,input().split()))
s=input()
count=0
for _ in range(q):
    l,r=[*map(int,input().split())]
    for i in range(l,r):
        if s[i-1]=='A':
            if s[i]=='C':
               count+=1 
    print(count)
    count=0

### FIXED CODE ###

n,q=(map(int,input().split()))
s=input()
count=0
c=[0]*n
for i in range(1,n):
        if s[i-1]=='A':
            if s[i]=='C':
               count+=1
        c[i]=count
for _ in range(q):
    l,r=(map(int,input().split())) 
    print(c[r-1]-c[l-1])
s = input()
k = int(input())
slen = len(s)
new_s = ""

for i in range(slen):
  val = ord("z") + 1 - ord(s[i])
  if k >= val:
    k -= val
    new_s += "a"
  else:
    new_s += s[i]
    
if k > 0:
  new_s = new_s[:-1] + chr(ord(s[slen-1]) + k)

print(new_s)

### FIXED CODE ###

s = input()
k = int(input())
slen = len(s)
new_s = ""

for i in range(slen):
  val = (ord("z") + 1 - ord(s[i])) % 26
  if k >= val:
    k -= val
    new_s += "a"
  else:
    new_s += s[i]
    
if k > 0:
  tmp_val = ord(new_s[slen-1]) + k % 26
  if tmp_val > ord("z"):
    tmp_val -= 26
  new_s = new_s[:-1] + chr(tmp_val)

print(new_s)
import math
A,B = map(int,input().split())

print(math.ceil((B-1)/(A-1)))


### FIXED CODE ###

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

print(math.ceil((B-1)/(A-1)))
[a, b, c] = [int(x) for x in input().split()]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flgw and b_c_flg:
    print('Yes')
    break
if not (a_b_flgw and b_c_flg):
  print('No')

### FIXED CODE ###

[a, b, c] = [int(x) for x in input().split(" ")]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flg and b_c_flg:
    print('Yes')
    break
if not (a_b_flg and b_c_flg):
  print('No')
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    import math

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

    # 素因数分解
    def prime_decomp(n):
        i = 2
        res = []
        while i ** 2 <= n:
            while n % i==0:
                n //= i
                res.append(i)
            i += 1
        if n > 1:
            res.append(n)
        return res
        # 素因数のリストを返す(0, 1は空)

    # aの逆元を求める
    def inv(a, mod=mod):
        return pow(a, mod-2, mod)

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


    lcm = [0]*(max(a)+1)
    for i in a:
        l = prime_decomp(i)
        c = Counter(l)
        for k, v in c.items():
            if lcm[k] < v:
                lcm[k] = v
    
    b = 1
    for i in range(1000):
        if lcm[i] != 0:
            b *= pow(i, lcm[i], mod)
    
    if n == 1:
        print(1)
    else:
        res = 0
        for i in a:
            res += inv(i)
        print(res*b%mod)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    import math

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

    def gcd(a, b):
        if b == 0:
            return a
        else:
            return gcd(b, a % b)
    
    def gcd_group(arr):
        g = gcd(arr[0], arr[1])
        for i in range(2, len(arr)):
            g = gcd(g, arr[i])
        return g
    
    def lcm(a, b):
        g = gcd(a, b)
        return (a*b)//g
    
    def lcm_group(arr):
        l = lcm(arr[0], arr[1])
        for i in range(2, len(arr)):
            l = lcm(l, arr[i])
        return l
    
    # groupは要素1つでエラー

    # aの逆元を求める
    def inv(a, mod=mod):
        return pow(a, mod-2, mod)

    n = int(input())
    a = list(map(int, input().split()))
    if n == 1:
        print(1)
    else:
        l = lcm_group(a)
        res = 0
        for i in a:
            res += inv(i)
        print(res*l%mod)

if __name__ == '__main__':
    main()
from itertools import accumulate
from bisect import bisect

N = int(input())
C = [0]+list(accumulate(map(int,input().split())))

def h(i,j):
  ci,cj = C[i],C[j]
  k = bisect(C, (ci+cj)//2, lo=i+1,hi=j)
  _,a,b = min((abs(ci+cj-2*c),cj-c,c-ci) for c in (C[k-1],C[k]))
  return a,b

def solve(x):
  L = h(0,x)+h(x,N)
  return max(L)-min(L)

print(min(solve(i) for i in range(2,N-2)))

### FIXED CODE ###

from itertools import accumulate
from bisect import bisect

N = int(input())
C = [0]+list(accumulate(map(int,input().split())))

def h(i,j):
  ci,cj = C[i],C[j]
  k = bisect(C, (ci+cj)//2, lo=i+1,hi=j)
  _,a,b = min((abs(ci+cj-2*c),cj-c,c-ci) for c in (C[k-1],C[k]))
  return a,b

def solve(x):
  L = h(0,x)+h(x,N)
  return max(L)-min(L)

print(min(solve(i) for i in range(2,N-1)))
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

import numpy as np
from scipy.sparse.csgraph._shortest_path import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
from scipy.sparse import csr_matrix

# strlist = "abcdefghijklmnopqrstuvwxyz"
n,x,y = map(int,input().split())

length = n
d = [1 for _ in range(n)]
i = list(range(0,n-1)) + [x]
j = list(range(1,n)) + [y]
# print(d,i,j,sep="\n")

graph = csr_matrix((d, (i, j)), shape=(n, n)) # 頂点i,jはゼロスタートである必要ある
# print(type(csr),csr,sep="\n")

#返り値は各頂点間の距離の値を含んだ隣接行列(float64型のnp.array)
dist = shortest_path(graph, directed=False).astype(int)
# dist = dijkstra(graph, directed=False).astype(int)
# print(type(dist),dist,sep="\n")

dist = dist.ravel() #配列の一次元化
# print(type(dist),dist,sep="\n")

ans = np.bincount(dist, minlength=n) // 2  #bincountは[0の個数,1の個数,2の個数…nの個数]を返す
# print(type(ans),ans,sep="\n")

print(*ans[1:], sep='\n')

### FIXED CODE ###

# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

import numpy as np
# import scipy as scp

# strlist = "abcdefghijklmnopqrstuvwxyz"
n,x,y = map(int,input().split())

ans = [0 for _ in range(n)]

for i in range(1,n):
    for j in range(i+1,n+1):
        kyori = min(j-i,abs(x-i)+1+abs(y-j),abs(i-y)+1+abs(x-j))
        ans[kyori] +=1

print(*ans[1:],sep="\n")
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
s, t=map(input().split())
cnt=0
for i in range(3)
if s[i]==t[i]:
  cnt +=1
print(cnt)

### FIXED CODE ###

s = input()
t = input()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
  	cnt += 1
print(cnt)
from collections import deque
n = int(raw_input())
stack = deque()
for i in range(n):
	i = raw_input()
	if "insert" in i:
		stack.insert(0, int(i[7:]))
	elif "delete " in i:
		if int(i[7:]) in stack:
		    stack.remove(int(i[7:]))
	elif "deleteFirst" in i:
		stack.pop(0)
	elif "deleteLast" in i:
		stack.pop()
print " ".join(map(str, stack))

### FIXED CODE ###

from collections import deque
n = int(raw_input())
stack = deque()
for i in range(n):
	i = raw_input()
	if "insert" in i:
		stack.appendleft(int(i[7:]))
	elif "delete " in i:
		if int(i[7:]) in stack:
		    stack.remove(int(i[7:]))
	elif "deleteFirst" in i:
		stack.popleft()
	elif "deleteLast" in i:
		stack.pop()
print " ".join(map(str, stack))
from collections import defaultdict
import sys
input = sys.stdin.readline

s = input()
t = input()
ds = defaultdict(int)
dt = defaultdict(int)
a = "abcdefghijklmnopqrstuvwxyz"
s_res = ""
t_res = ""

for i in range(len(s)):
    ds[s[i]] += 1
    dt[t[i]] += 1
    s_res += a[len(ds)-1]
    t_res += a[len(dt)-1]

if s_res == t_res:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

from collections import defaultdict
import sys
input = sys.stdin.readline

s = input()
t = input()
ds = defaultdict(str)
dt = defaultdict(str)

ans = "Yes"
for c1, c2 in zip(s, t):
    if c1 not in ds:
        ds[c1] = c2
    else:
        if ds[c1] != c2:
            ans = "No"
    
    if c2 not in dt:
        dt[c2] = c1
    else:
        if dt[c2] != c1:
            ans = "No"
print(ans)
a,b=input().split()
c=int(a)
d=float(b)
print(int(a*b))

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b.replace(".",""))
print(a*b//100)
l = map(int, input().split())
a=list(l)
x1=a[0]
y1=a[1]
x2=a[2]
y2=a[3]
x=x2-x1
y=y2-y1
x3=x2-y
y3=y2+x
x4=x1-y
y4=y1+x
c=[x3, y3, x4, y4]
print(c[0], c[1], c[2], c[3])


### FIXED CODE ###

N= int(input())
print(N//2 * (N-N//2))
x, n = list(map(int, input().split()))
if n == 0:
  print(x)
  exit(0)
else:
  arr = list(map(int, input().split()))

arr.sort()
i = arr.index(x)

if not i:
  print(x)
  exit(0)

j = 1
for _ in range(n):
  row = i - j
  high = i + j
  if arr[row] != x - j:
    print(x - j)
    break
  elif arr[high] != x + j:
    print(x + j)
    break
  
  j += 1



### FIXED CODE ###

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

if n == 0:
  print(x)
  exit(0)
else:
  arr = list(map(int, input().split()))

arr.sort()
if x in arr:
  i = arr.index(x)
else:
  print(x)
  exit(0)

if not i and i != 0:
  print(x)
  exit(0)

j = 1
for _ in range(n):
  row = i - j
  high = i + j
  if x - j not in arr:
    print(x - j)
    exit(0)
  elif x + j not in arr:
    print(x + j)
    exit(0)
  j += 1

print(x-1)
n = int(raw_input())

ans = 100000

d = []

for a in range(1,7):d.append( 6**a )
for a in range(1,6):d.append( 9**a )
d.append(1)
d.sort()
#print d

dp = [1000000000] * 100000
dp[0] = 0
for x in range(0,n+1):
  for y in d:
    if x-y >= 0:
      dp[x] = min( dp[x-y] + 1, dp[x] )

print dp[n]


### FIXED CODE ###

n = int(raw_input())

ans = 100000

d = []

for a in range(1,7):d.append( 6**a )
for a in range(1,6):d.append( 9**a )
d.append(1)
d.sort()
#print d

dp = [1000000000] * 100001
dp[0] = 0
for x in range(0,n+1):
  for y in d:
    if x-y >= 0:
      dp[x] = min( dp[x-y] + 1, dp[x] )

print dp[n]
import math 

a,b = map(int,input().split())
ans = math.sqrt(int(str(a) + str(b)))
if ans.isinteger() == True:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import math

a,b = map(int,input().split())
ans = math.sqrt(int(str(a) + str(b)))
if ans.is_integer() == True:
  print("Yes")
else:
  print("No")
import sys

N=int(input())
A = list(map(int,input().split()))
 
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

if gcd_list(A) > 1:
    print("not coprime")
    sys.exit()

D = [i for i in range(max(A)+1)] #iを割り切る最小の素数を格納
p = 2
 
while(p*p<=max(A)):
    if D[p]==p:
        for i in range(p*p,max(A)+1,p):
            if D[i]==i:
                D[i]=p
 
    p+=1
    
prime = set()
for a in A:
    tmp=D[a]
    L=set()
    while(a>1):
        a=a//tmp
        L.add(tmp)
        tmp=D[a]

    for l in L:
        if l in prime:
            print("setwise coprime")
            sys.exit()
        else:
            prime.add(l)

print("pairwise coprime")

### FIXED CODE ###

D,T,S=map(int,input().split())

if D <= T*S:
    print('Yes')
else:
    print('No')
def qSort(a):
    if len(a) in (0, 1):
        return a

    p = a[-1]
    l = [x for x in a[:-1] if x[1] <= p[1]]
    r = [x for x in a[:-1] if x[1] > p[1]]

    return qSort(l) + [p] + qSort(r)


N = int(input())
ab = [list(map(int, input().split())) for i in range(N)]
ab = qSort(ab)
for i in range(N):
    for j in range(i, N):
        ab[j][1] -= ab[i][0]
        if ab[j][1] < 0:
            print("No")
            exit()
print("Yes")


### FIXED CODE ###

N = int(input())
ab = [[0, 0]] + [list(map(int, input().split())) for i in range(N)]
ab = sorted(ab, key=lambda x: x[1])
for i in range(len(ab) - 1):
    ab[i + 1][0] += ab[i][0]
    if ab[i + 1][1] < ab[i + 1][0]:
        print("No")
        exit()

print("Yes")
n = int(input())
bara=list(map(int,input().split()))

number=[1]
for i in range(2,n):
  List.append(i)
    
for i in range n-1:
  if bara[i] != number[i]:
    count+=1

if count==2:
  print("YES")
else:
  print("NO")



### FIXED CODE ###

n = int(input())
bara=list(map(int,input().split()))
number=list(range(1,n+1))

count = 0
    
for i in range (0,n):
    if bara[i] != number[i]:
        count += 1

if count==2 or count==0:
    print("YES")
else:
    print("NO")
n=int(input())
a=list(map(int,input().split()))

mod=10**9+7
import numpy as np
total = sum(a)
cum=[]

ans=0
for i in range(n):
    total-=a[i]
    ans += a[i]*(total)%mod
    

print(ans%mod)

### FIXED CODE ###

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

mod=10**9+7
import numpy as np

cum=[]

prev=0
for i in range(n):
    tmp = prev%mod +a[i]%mod
    cum.append(tmp)
    prev = cum[-1]


ans=0
for i in range(n-1):
    p=a[i]
    t = cum[-1] - cum[i]

    ans+=(p*t)%mod

print(ans%mod)
d, t, s = input().split()
if t*s >= d:
	print "Yes"
else:
	print "No"

### FIXED CODE ###

d, t, s = map(int, input().split())
if t*s >= d:
	print ("Yes")
else:
	print ("No")
a, b, c = map(int, input())
k = int(input())

n = 0
while b <= a:
  b = b*2
  n += 1
while c <= b:
  c = c*2
  n += 1
if n <= k:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a, b, c = map(int, input().split())
k = int(input())
 
n = 0
while b <= a:
  b = b*2
  n += 1
while c <= b:
  c = c*2
  n += 1
if n <= k:
  print("Yes")
else:
  print("No")
while 1:
	list = raw_input().split()
	x = int(list[0]) + int(list[1])
	print "%d" % len(str(x))

### FIXED CODE ###

while 1:
	try:
		list = str(raw_input()).split()
		x = int(list[0]) + int(list[1])
		print "%d" % len(str(x))

	except:
		break
n = int(input())
a=[int(i) for i in input().split()]
s=[]
sa=n*(n+1)/2

s.append(a)
for i in range(1,n):
  s.append([])
  for j in range(len(s[i-1])-1):
    if s[i-1][j]<s[i-1][j+1]:
        s[i].append(s[i-1][j])
        sa+=s[i-1][j]
    else:
        s[i].append(s[i-1][j+1])
        sa+=s[i-1][j+1]
print(int(sa))

### FIXED CODE ###

s = input()

a=[]
for i in range(len(s)):
 if s[i]=="S":
     a.append("S")
 if s[i]=="T":
     if len(a)==0 or a[-1]=="T":
         a.append("T")
     if a[-1]=="S":
         a.pop()
print (len(a))
s = int(input())

if s == 1:
  print("ACL"):
elif s == 2:
  print("ACLACL"):
elif s == 3:
  print("ACLACLACL"):
elif s == 4:
  print("ACLACLACLACL"):
else:
  peint("ACLACLACLACLACL"):
    

### FIXED CODE ###

K = int(input())

if K == 1:
    print("ACL")
elif K == 2:
    print("ACLACL")
elif K == 3:
    print("ACLACLACL")
elif K == 4:
    print("ACLACLACLACL")
else:
    print("ACLACLACLACLACL")
a = int(input()) - int(input())*2
if a > 0:
  print(a)
else:
  print("0")


### FIXED CODE ###

x,y = map(int, input().split())
a = x - y*2
if a > 0:
  print(a)
else:
  print("0")