p = list(map(int, input().split(' '))) cnt = 0 for n in p: if n - cnt != 1: print(n - 1) break cnt += 1