B=[int(i) for i in input().split()] B.sort() B.append(11) i=0 while B[i]==i+1 and i<10: i+=1 print(i+1)