def Main(): b=set(map(int,input().split())) for i in range(1,11): if i not in b: print(i) break Main()