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