def main(): S = sorted(input() for i in range(3)) print(S[1]) if __name__ == '__main__': main()