import numpy as np num_list = list(map(int, input().split())) num = np.median(num_list) if len(num_list) % 2 != 0: num = int(num) print(num) else: print(num)