import sys line = [int(i) for i in input().split()] for i in line: if line[i+1] != line[i] + 1: print(line[i] + 1) sys.exit()