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