B = list(map(int, input().split(" "))) for i, b in enumerate(B): if b != (i+1): print(i+1) break