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