nums = list(map(int, input().split())) for i in range(1, 10): if not i in nums: break print(i)