import heapq a = [int(i) for i in input().split()] heapq.heapify(a) i = 1 while a: if (i == heapq.heappop(a)): i += 1 else: break print("%d" % i)