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

x = 1
for i in B:
    if i != x:
        print(x)
        break
    x += 1

if x == 10:
    print(10)