S = [input() for _ in range(3)] print(sorted(S)[1])