data = [int(s) for s in input().split()] for i in range(1,11): if i == 10: print(10) break if i != data[i-1]: print(i) break