B=list(map(int,input().split())) if (1 in B)==False: print(1) elif (10 in B)==False: print(10) else: for i in range(len(B)-1): if B[i]-B[i+1]!=-1: print(B[i]+1)