Bn = list(map(int,input().split())) L = range(1,11) for i in range(10): if not ( L[i] in Bn ): break print(L[i])