lst = [int(i) for i in input().split()] for idx, val in enumerate(lst) : if idx + 1 != val : print(idx + 1) break