def main(): input() values = [int(i) for i in input().split()] sorted_values = sorted(values) value_num = len(values) print(sorted_values) if value_num % 2 == 0: mid_index = value_num // 2 mid = (sorted_values[mid_index - 1] + sorted_values[mid_index]) / 2 print(mid) else: mid_index = value_num // 2 mid = sorted_values[mid_index] print(mid) if __name__ == '__main__': main()