B = list(map(int, input().split())) ans = 0 for i in range(1, 11): if B.__contains__(i): pass else: ans = i break print(ans)