a=list(map(int,input().split())) s=set(a) for i in range(1,11): if i not in s: print(i) break