use std::io::{self, Read}; fn read_stdin() -> Vec { let mut buffer = String::new(); io::stdin().read_to_string(&mut buffer).ok(); buffer.trim().split('\n').map(|s| s.to_string()).collect() } fn main() { let input = read_stdin(); let n = &input[0].parse::().unwrap(); let mut nums = input[1].split(' ').map(|s| s.parse::().unwrap()).collect::>(); nums.sort(); let result: f64 = if n % 2 == 1 { *&nums[*n / 2] as f64 } else { let r = &nums[*n / 2 - 1..*n / 2 + 1]; let total = r.iter().sum::() as f64; total / 2.0 }; println!("{}", result); }