a = list(map(int, input().split())) odr = [int(i) for i in range(1,11)] for i in odr: if i != a[i-1]: print(i) break