nums = map(int,input().split()) for t,ist in zip(range(1,10 + 1),nums): if t != ist: print(t) break else: print(10)