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