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

X, N = map(int, input().split())
if N == 0:
    print(X)
    sys.exit()
p = list(map(int, input().split()))

comp = 101
for i in range(100):
    i += 1    
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

Fixed submission:
import sys

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

if N == 0:
    print(X)
    sys.exit()

comp = 101
for i in range(102):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

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

X, N = map(int, input().split())
if N == 0:
    print(X)
    sys.exit()
p = list(map(int, input().split()))

comp = 101
for i in range(1, 101):
    x = abs(X - i)
    if comp == x:
        break
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

Fixed submission:
import sys

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

if N == 0:
    print(X)
    sys.exit()

comp = 101
for i in range(102):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

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

X, N = map(int, input().split())
if N == 0:
    print(X)
    sys.exit()
p = list(map(int, input().split()))

comp = 101
for i in range(1, 101):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)


Fixed submission:
import sys

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

if N == 0:
    print(X)
    sys.exit()

comp = 101
for i in range(102):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

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

X, N = map(int, input().split())
if N == 0:
    print(X)
    sys.exit()
p = list(map(int, input().split()))

comp = 101

for i in range(1, 101):
    x = abs(X - i)
    if x == comp:
        break
    if comp > x and i not in p and:
        comp = x
        result = i

print(result)

Fixed submission:
import sys

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

if N == 0:
    print(X)
    sys.exit()

comp = 101
for i in range(102):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

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

X, N = map(int, input().split())
if N == 0:
    print(X)
    sys.exit()
p = list(map(int, input().split()))

comp = 101

for i in range(1, 101):
    x = abs(X - i)
    if x == comp:
        sys.exit()
    if comp > x and i not in p and:
        comp = x
        result = i

print(result)

Fixed submission:
import sys

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

if N == 0:
    print(X)
    sys.exit()

comp = 101
for i in range(102):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)

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

X, N = map(int, input().split())
if N == 0:
    print(X)
    sys.exit()
p = list(map(int, input().split()))

comp = 101
for i in range(1, 101):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)


Fixed submission:
import sys

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

if N == 0:
    print(X)
    sys.exit()

comp = 101
for i in range(102):
    x = abs(X - i)
    if comp > x and i not in p:
        comp = x
        result = i

print(result)