def solve(): li = input().split(' ') for i in range(1, 11): if (str(i) != li[i - 1]): print(i) break solve()