a=1 B = list(map(int,input().split())) while a in B: a+=1 print(a)