b = input().split() for i in range(1,11): if not str(i) in b: print(i) break