bList = list(map(int, input().split())) bList.sort() r = 10 for i in range(9): if bList[i] != i + 1: r = i + 1 break print(r)