B = list(map(int,input().split())) B.sort() for i in range(1,10): if (i == B[i-1]): continue else: break print(i)