use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {n: usize, v: [usize; n]};

    let mut v: Vec<usize> = v;
    v.sort();

    while v.len() > 1 {
        let m1 = v.pop().unwrap();
        let m2 = v.pop().unwrap();
        v.push((m1 + m2) / 2);
        v.sort();
    }

    println!("{}", v[0]);
}
