num_l = list(map(int, input().split())) for i in num_l: if i != num_l.index(i) + 1: print(i-1) break