Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np
N, M = [int(a) for a in input().split()]
P = []
Y = []

for _ in range(M):
    p, y =  [int(a) for a in input().split()]
    P.append(p)
    Y.append(y)

index = [1 for _ in range(len(P))]
id = ["" for _ in range(len(P))]

for i in np.argsort(Y):
    id[i] = "{0:06d}".format(P[i])+"{0:06d}".format(index[P[i]])
    index[P[i]] += 1

for i in id:
    print(i)

Fixed submission:
import numpy as np
N, M = [int(a) for a in input().split()]
P = []
Y = []

for _ in range(M):
    p, y =  [int(a) for a in input().split()]
    P.append(p)
    Y.append(y)

index = {}
id = ["" for _ in range(len(P))]

for i in np.argsort(Y):
    index[P[i]] = index.get(P[i], 1)
    id[i] = "{0:06d}".format(P[i])+"{0:06d}".format(index[P[i]])
    index[P[i]] += 1

for i in id:
    print(i)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(aa) for aa in input().split()]

def add_entry(hist, aa):
    if aa in hist:
        hist[aa] += 1
    else:
        hist[aa] = 1


def make_hist(a):
    even_hist = {}
    odd_hist = {}

    for i in range(len(a)//2):
        add_entry(even_hist, a[2*i])
        add_entry(odd_hist, a[2*i+1])

    return even_hist, odd_hist


def get_sorted_hist(hist):
    return sorted(hist.items(), key=lambda x: -x[1])

eh, oh = make_hist(a)
seh = get_sorted_hist(eh)
soh = get_sorted_hist(oh)

print(seh, soh)

if seh[0][0] != soh[0][0]:
    print(len(a) - seh[0][1] - soh[0][1])
else:
    if len(seh) == 1 and len(soh) == 1:
        print(len(a)//2)
    elif len(seh) == 1:
        print(len(a) - seh[0][1] - soh[1][1])
    elif len(soh) == 1:
        print(len(a) - soh[0][1] - seh[1][1])
    else:
        print(min(len(a) - seh[0][1] - soh[1][1], len(a) - soh[0][1] - seh[1][1]))


Fixed submission:
n = input()

ans = ""
for nn in n:
    if nn == "1":
        ans += "9"
    elif nn == "9":
        ans += "1"

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(aa) for aa in input().split()]

def add_entry(hist, aa):
    if aa in hist:
        hist[aa] += 1
    else:
        hist[aa] = 1


def make_hist(a):
    even_hist = {}
    odd_hist = {}

    for i in range(len(a)//2):
        add_entry(even_hist, a[2*i])
        add_entry(odd_hist, a[2*i+1])

    return even_hist, odd_hist


def get_sorted_hist(hist):
    return sorted(hist.items(), key=lambda x: -x[0])


eh, oh = make_hist(a)
seh = get_sorted_hist(eh)
soh = get_sorted_hist(oh)

if seh[0][0] != soh[0][0]
    print(len(a) - seh[0][1] - soh[0][1])
else:
    if seh[0][1] >= soh[0][1]:
        print(len(a) - seh[0][1] - soh[1][1])
    else:
        print(len(a) - seh[1][1] - soh[0][1])


Fixed submission:
n = int(input())
a = [int(aa) for aa in input().split()]

def add_entry(hist, aa):
    if aa in hist:
        hist[aa] += 1
    else:
        hist[aa] = 1


def make_hist(a):
    even_hist = {}
    odd_hist = {}

    for i in range(len(a)//2):
        add_entry(even_hist, a[2*i])
        add_entry(odd_hist, a[2*i+1])

    return even_hist, odd_hist


def get_sorted_hist(hist):
    return sorted(hist.items(), key=lambda x: -x[1])

eh, oh = make_hist(a)
seh = get_sorted_hist(eh)
soh = get_sorted_hist(oh)


if seh[0][0] != soh[0][0]:
    print(len(a) - seh[0][1] - soh[0][1])
else:
    if len(seh) == 1 and len(soh) == 1:
        print(len(a)//2)
    elif len(seh) == 1:
        print(len(a) - seh[0][1] - soh[1][1])
    elif len(soh) == 1:
        print(len(a) - soh[0][1] - seh[1][1])
    else:
        print(min(len(a) - seh[0][1] - soh[1][1], len(a) - soh[0][1] - seh[1][1]))
Buggy python submission (verdict: Runtime Error):
import numpy as np
import math

line = input().split()
N = int(line[0])
X = int(line[1])

line = input().split()


diff = [abs(int(x)-X) for x in line]

min_ = math.gcd(diff[0], diff[0])

for df in diff:
    min_ = min(min_, math.gcd(diff[0], df))

print(min_)

Fixed submission:
import numpy as np

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
    
line = input().split()
N = int(line[0])
X = int(line[1])

line = input().split()

diff = [abs(int(x)-X) for x in line]

min_ = gcd(diff[0], diff[0])

for df in diff:
    min_ = min(min_, gcd(diff[0], df))

print(min_)
Buggy python submission (verdict: Runtime Error):
line = input().split()
N = int(line[0])
i = int(line[1])

print(n-i+1)


Fixed submission:
line = input().split()
N = int(line[0])
i = int(line[1])

print(N-i+1)
Buggy python submission (verdict: Runtime Error):
H, W = [int(x) for x in input().split()]

def solve(H, W):
  if H % 3 == 0 or W % 3 == 0:
    return 0  
  else:
    min_ = 1e10
    a = 0
    ans = 1e20
    for i in range(W+1):
      if abs(i-target) < min_:
        a = i
        min_ = abs(i-target)
      b = W - a
      target = H/2
      for i in range(min(int(target)-1, 2), min(int(target)+2, H+1)):
        if abs(i-target) < min_:
          c = i
          min_ = abs(i-target)
      d = H - c
      S = [a*H, b*c, b*d]
    ans = min(ans, max(S)-min(S))
  return ans

print(min(solve(H, W), solve(W, H)))


Fixed submission:
H, W = [int(x) for x in input().split()]

def solve(H, W):
  if H % 3 == 0 or W % 3 == 0:
    return 0  
  else:
    ans = 1e20
    for i in range(max(W//3-1, 1), min(W//3+2, W)):
      a = i
      b = W - a
      for i in range(max(H//2-1, 1), min(H//2+2, H)):
        c = i
        d = H - c
        S = [a*H, b*c, b*d]
        ans = min(ans, max(S)-min(S))
      for i in range(max(b//2-1, 1), min(b//2+2, b)):
        c = i
        d = b - c
        S = [a*H, c*H, d*H]
        ans = min(ans, max(S)-min(S))
  return ans

print(min(solve(H, W), solve(W, H)))

Buggy python submission (verdict: Runtime Error):
H, W = [int(x) for x in input().split()]

def solve(H, W):
  if H % 3 == 0 or W % 3 == 0:
    return 0  
  else:
    target = W/3
    min_ = 1e10
    a = 0
    for i in range(min(int(target)-1, 2), min(int(target)+2, W+1)):
      if abs(i-target) < min_:
        a = i
        min_ = abs(i-target)
    b = W - a
    target = H/2
    min_ = 1e20
    for i in range(min(int(target)-1, 2), min(int(target)+2, H+1)):
      if abs(i-target) < min_:
        c = i
        min_ = abs(i-target)
    d = H - c
    S = [a*H, b*c, b*d]
    return max(S)-min(S)

print(min(solve(H, W), solve(W, H))



Fixed submission:
H, W = [int(x) for x in input().split()]

def solve(H, W):
  if H % 3 == 0 or W % 3 == 0:
    return 0  
  else:
    ans = 1e20
    for i in range(max(W//3-1, 1), min(W//3+2, W)):
      a = i
      b = W - a
      for i in range(max(H//2-1, 1), min(H//2+2, H)):
        c = i
        d = H - c
        S = [a*H, b*c, b*d]
        ans = min(ans, max(S)-min(S))
      for i in range(max(b//2-1, 1), min(b//2+2, b)):
        c = i
        d = b - c
        S = [a*H, c*H, d*H]
        ans = min(ans, max(S)-min(S))
  return ans

print(min(solve(H, W), solve(W, H)))
Buggy python submission (verdict: Runtime Error):
O = input()
E = input()

ans = ""

for i in range(len(O)):
  ans += O[i] + E[i]

if len(O) > len(E):
  ans += O[-1]

print(ans)

Fixed submission:
O = input()
E = input()

ans = ""

for i in range(len(E)):
  ans += O[i] + E[i]

if len(O) > len(E):
  ans += O[-1]
  
print(ans)
Buggy python submission (verdict: Runtime Error):
from sys import stdin
input = list(stdin.readline().rstrip())

n = len(input)

if n % 2 == 1:
    del input[n//2]
    n = len(input)
cnt = 0
for i in range(n/2-1, -1, -1):
    print(i, n-i-1)
    if input[i] != input[n-i-1]:
        cnt += 1

print(cnt)

Fixed submission:
from sys import stdin
input = list(stdin.readline().rstrip())

n = len(input)

if n % 2 == 1:
    del input[n//2]
    n = len(input)
cnt = 0
for i in range(int(n/2)-1, -1, -1):
    if input[i] != input[n-i-1]:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
S = input()

for i in range(1, len(S)):
    if S[i-1] == S[i]:
        print('Bad')
        exit(1)

print('Good')

Fixed submission:
S = input()

flag = True
for i in range(1, len(S)):
    if S[i-1] == S[i]:
        flag = False
if flag == True:
    print('Good')
else:
    print('Bad')
Buggy python submission (verdict: Runtime Error):
inp = map(int, input().split(' '))

l = []
for fst in inp:
    for sec in inp:
        if fst == sec:
            pass
        else:
            l.append(fst + sec)

print(min(l))


Fixed submission:
inp = list(map(int, input().split(' ')))

l = []
for fst in inp:
    inp.remove(fst)
    for sec in inp:
        l.append(fst + sec)

print(min(l))
Buggy python submission (verdict: Runtime Error):
 A, B, C = map(int, input().split(' '))

if A == B and B == C:
    print('Yes')
else:
    print('No')


Fixed submission:
A, B, C = map(int, input().split(' '))

if A == B and B == C:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input())

if A**2 + B**2 == C**2:
    print('Yes')
else:
    print('No')


Fixed submission:
A, B, C = map(int, input().split(' '))

if A == B and B == C:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
def main():
    to = ['T', 'G']
    fr = ['A', 'C']

    print(to[fr.index(input())])


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    to = ['T', 'G']
    fr = ['A', 'C']

    inc = input()

    try:
        print(to[fr.index(inc)])
    except Exception:
        print(fr[to.index(inc)])


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
ACGT = ['A', 'C', 'G', 'T']


def not_acgt(s):
    for c in s:
        if c not in ACGT:
            return False

    return True


def main():
    S = input()

    results = []
    # all_results = []
    for i in range(len(S)):
        for j in range(len(S)):
            if not_acgt(S[i:j+1]):
                results.append(S[i:j+1])
            # all_results.append(S[i:j+1])

    print(max([len(s) for s in results]))


if __name__ == "__main__":
    main()


Fixed submission:
ACGT = ['A', 'C', 'G', 'T']


def not_acgt(s):
    for c in s:
        if c not in ACGT:
            return False

    return True


def main():
    S = input()

    results = []
    # all_results = []
    for i in range(len(S)):
        for j in range(len(S)):
            if not_acgt(S[i:j+1]):
                results.append(S[i:j+1])
            # all_results.append(S[i:j+1])
    try:
        print(max([len(s) for s in results]))
    except Exception:
        print(0)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    H, W = map(int, input())
    h, w = map(int, input())

    print(H*W - h*w)


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    H, W = map(int, input().split())
    h, w = map(int, input().split())

    print(H*W - (h*W + (H-h)*w))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    S = list(input())
    count = 0
    while True:
        start_count = count
        for i, val in enumerate(S):
            try:
                if S[i] != S[i+1]:
                    S.pop(i)
                    S.pop(i)
                    count += 2
            except IndexError:
                pass

        if start_count == count:
            break

    print(count)


if __name__ == "__main__":
    main()


Fixed submission:
from collections import Counter


def main():
    S = list(input())
    c = Counter(S)
    print(len(S) - abs(c['0'] - c['1']))


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    S = list(input())
    count = 0
    while True:
        start_count = count
        for i, val in enumerate(S):
            try:
                if S[i] != S[i+1]:
                    S.pop(i)
                    S.pop(i)
                    count += 2
            except IndexError:
                pass

        if start_count == count:
            break

    print(count)


if __name__ == "__main__":
    main()


Fixed submission:
from collections import Counter


def main():
    S = list(input())
    c = Counter(S)
    print(len(S) - abs(c['0'] - c['1']))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

elif len(list(range(1, N+1, 2))) >= K:
    print('YES')
else:
    print('NO')


Fixed submission:
N, K = map(int, input().split())

if len(list(range(1, N+1, 2))) >= K:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

result = len(
    [str(x) for x in range(1, n+1)
     if '7' in str(x) and '5' in str(x) and '3' in str(x) and '0' not in str(x) and '1' not in str(x) and '2' not in str(x) and '4' not in str(x) and '6' not in str(x) and '8' not in str(x) and '9' not in str(x)]
)
print(result)


Fixed submission:
# 753数を列挙したほうが速い

N = int(input())


def func(s):
    global N
    if int(s) > N:
        return 0

    ret = 1 if all(s.count(c) > 0 for c in '753') else 0

    for char in '753':
        ret += func(s + char)
    return ret


print(func('0'))
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N == 1:
    print('Hello, World')
else:
    A, B = map(int, open(0).read().split())
    print(A+B)


Fixed submission:
N = int(input())

if N == 1:
    print('Hello World')
else:
    A, B = map(int, [input() for i in range(2)])
    print(A+B)
Buggy python submission (verdict: Runtime Error):
def main():
    inputs = sorted([int(x) for x in input().split()])
    fst = inputs[-1]
    lst = inputs[0]
    mid = inputs[1]

    print(eval(f'{fst}{mid} + {lst}'))


if __name__ == "__main__":
    main()


Fixed submission:
def main():
    inputs = sorted(input().split())
    fst = inputs[-1]
    lst = inputs[0]
    mid = inputs[1]

    print(eval('{}{} + {}'.format(fst, mid, lst)))


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split))
if 0 < n < 10 and 0 < m < 10 :
  print(n*m)
else :
  print(-1)
  

Fixed submission:
n,m = list(map(int,input().split()))
if 0 < n < 10 and 0 < m < 10 :
  print(n*m)
else :
  print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = list(map(int,input().split()))
l = sorted([int(a) for a in input().split()])
for i in range (m):
  l.sort(reverse=True)
  l[0]=l[0]//2
print(sum(l))

Fixed submission:
import heapq
n,m = list(map(int,input().split()))
l = sorted([(int(a)*-1) for a in input().split()])
for i in range (m):
  high = heapq.heappop(l)
  heapq.heappush(l,-(-high//2))
print(abs(sum(l)))

Buggy python submission (verdict: Time Limit Exceeded):
n,m = list(map(int,input().split()))
l = sorted([int(a) for a in input().split()])
for i in range (m):
  l.sort()
  l.reverse()
  l[0]=l[0]//2
print(sum(l))

Fixed submission:
import heapq
n,m = list(map(int,input().split()))
l = sorted([(int(a)*-1) for a in input().split()])
for i in range (m):
  high = heapq.heappop(l)
  heapq.heappush(l,-(-high//2))
print(abs(sum(l)))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(a) for a in input().split()]
for i in range (n-1):
  aa = min(a[i],a[i+1])
  aaa.append(aa)
print(aaa)

Fixed submission:
n = int(input())
a = [int(a) for a in input().split()]
aaa=[]
if n==2:
  print(a[0]*2)
else:
  aaa.append(a[0])
  for i in range (1,n-1):
    aa = min(a[i-1],a[i])
    aaa.append(aa)
  aaa.append(a[n-2])
  print(sum(aaa))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(a) for a in input().split()]
aans =0
for i in range(n):
  ans=0
  for ii in range (i,n-1):
    if a[ii] >= a[ii+1]:
      ans +=1
    else:
      break
  if ans >aans:
    aans =ans
print(aans)
    
    

Fixed submission:
n = int(input())
a = [int(a) for a in input().split()]
aans =0
ans =0
for i in range(n-1):
  if a[i] >= a[i+1]:
    ans +=1
  else :
    if ans >aans:
      aans =ans
      ans = 0
    else :
      ans =0
if ans >aans:
  aans =ans
print(aans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
mylist = []
for i in range (N):
  A = int(input())
  mylist.append(int(A))
my = sorted(mylist,reverse=True)
del my[2:]
for j in range (N):
  if mylist[j] == my[0]:
    print(my[1])
  else:
    print(my[0])

Fixed submission:
r = int(input())
print(3* (r**2))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
mylist = []
for i in range (N):
  A = int(input())
  mylist.append(int(A))
for j in range (N):
  data = mylist[j]
  my = sorted(mylist,reverse=True)
  if data == my[0]:
    print(my[1])
  else:
    print(my[0])
del my[2:]

Fixed submission:
N = int(input())
mylist = []
first=0
second=0
for i in range (N):
  A = int(input())
  if first < A:
    first = A
  elif second < A:
    second = A
  mylist.append(A)
for i in range (N):
  if mylist[i] == first:
    print(second)
  else :
    print(first)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
mylist = []
for i in range (N):
  A = int(input())
  mylist.append(int(A))
for j in range (N):
  data = mylist[j]
  my = sorted(mylist,reverse=True)
  if data == my[0]:
    print(my[1])
  else:
    print(my[0])

Fixed submission:
N = int(input())
mylist = []
first=0
second=0
for i in range (N):
  A = int(input())
  if first < A:
    first = A
  elif second < A:
    second = A
  mylist.append(A)
for i in range (N):
  if mylist[i] == first:
    print(second)
  else :
    print(first)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
M = input()
l = M.split()
ll = list(map(int, l))
q=0
ans=1
for i in range(a):
  ai +=1
  q += ll[i]
  if q <= b :
    ans += 1
print(ans)


Fixed submission:
a,b=map(int,input().split())
M = input()
l = M.split()
ll = list(map(int, l))
q=0
ans=1
for i in range(a):
  q += ll[i]
  if q <= b :
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c=input(int()).split()
s = b
aa = int(a)
cc = int(c)
bb = int(b)
for i in  range(10):
    d= aa * cc - bb
    cc = d
    print (int(d))

Fixed submission:
a,b=input().split()
if int(a) >= 13 :
    print(int(b))
if int(a) >= 6 and int(a) <=12 :
    print(round(int(b) / 2))
if int(a) <= 5 :
    print(0)
Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
C = input()
if A > C > B :
    print("Yes")
elif B > C > A :
    print("Yes")
else :
    print("No")


Fixed submission:
A,B,C = map(int,input().split())
if A > C > B :
    print("Yes")
elif B > C > A :
    print("Yes")
else :
    print("No")

Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
C = input()
if A < B:
    D = B
    E = A
else :
    E = B
    D = A

if D > C > E :
    print("Yes")
else :
    print("No")

Fixed submission:
A,B,C = map(int,input().split())
if A > C > B :
    print("Yes")
elif B > C > A :
    print("Yes")
else :
    print("No")

Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
C = input()
if A < B:
    D = B
    E = A
else :
    E = B
    D = A
if D > C > E :
    print("yes")
else :
    print("no")

Fixed submission:
A,B,C = map(int,input().split())
if A > C > B :
    print("Yes")
elif B > C > A :
    print("Yes")
else :
    print("No")

Buggy python submission (verdict: Runtime Error):
A = input()
B = input()
C = input()
if A < B:
    D = B
    E = A
else :
    E = B
    D = A

if D > C > E :
    print("yes")
else :
    print("no")

Fixed submission:
A,B,C = map(int,input().split())
if A > C > B :
    print("Yes")
elif B > C > A :
    print("Yes")
else :
    print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N):
  c += 1
  if b < a[c] and a[c - 1]  <a[c] :
    ans += 1
print(ans + 1) 

Fixed submission:
N = int(input())
a = [int(i) for i in input().split()]
b = a[0]
c = 0
ans = 0
for i in range(N-1):
  c += 1
  if b <= a[c] :
    b = a[c]
    ans += 1
print(ans + 1)
Buggy python submission (verdict: Runtime Error):
if N % 2 != 0:
    print("No")
else:
    sa = S[:(N//2)]
    sb = S[(N//2):]

    if sa == sb:
        print("Yes")
    else:
        print("No")

Fixed submission:
N = int(input())
S = input()

if N % 2 != 0:
    print("No")
else:
    sa = S[:(N//2)]
    sb = S[(N//2):]

    if sa == sb:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())

def divisor(n):
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
 
if len(divisor(N)) < 3:
    print(N - 1)
else:
    divisor_list = divisor(N)
    tmp = N
    for i in divisor_list:
        A = i
        B = N / i
        if tmp > (A + B - 2):
            tmp = (A + B - 2)
    print(int(tmp))


Fixed submission:
A, B = input().split(" ")
A = int(A)
B = int(B)

if (0 < A) & (A < 10):
    if (0 < B) & (B < 10):
        print(A * B)
    else:
        print(-1)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
S = input().split()
cnt = 1
num = int(S[0])

if int(S[1]) == 1:
  print("0")
else:
	while(num < int(S[1])):
    	num += int(S[0]) - 1
    	cnt += 1
    
	print(cnt)

Fixed submission:
S = input().split()
cnt = 1
num = int(S[0])

if int(S[1]) == 1:
  print(0)
else:
  while(num < int(S[1])):
    num += (int(S[0]) - 1)
    cnt += 1
  print(cnt)
Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

max_num = args[1]
kernel = args[2]

print(max_num - kernel + 1)

Fixed submission:
n = input().split()

max_num = int(n[0])
kernel = int(n[1])

print(max_num - kernel + 1)

Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

max_num = args[1]
kernel = args[2]

print(max_num - kernel + 1)

Fixed submission:
n = input().split()

max_num = int(n[0])
kernel = int(n[1])

print(max_num - kernel + 1)