n = list(map(int,input().split())) if n[len(n)-1] != 10: print(10) else: for i in range(10): if n[i] != i+1: print(i+1) break