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