x = [int(x) for x in input().split()] for a in range(1,11) : if a not in x : print(a) break