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 mid = *&nums.len() / 2; let result: f64 = if n % 2 == 1 { *&nums[mid] as f64 } else { let total = *&nums[mid - 1..mid].iter().sum::() as f64; total / 2.0 }; println!("{}", result); }