// Template from https://techracho.bpsinc.jp/jhonda/2019_08_05/78537

// input macro for competive-programming from https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };

    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($next:expr, [ $t:tt ]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, bytes) => {
        read_value!($iter, String).into_bytes()
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    use std::io::Read;
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();

    println!("{}", solve(&s));
}

macro_rules! test {
    ($($input:expr => $output:expr),* $(,)*) => {
        #[test]
        fn solve_test() {
            $(
                assert_eq!(solve($input), $output);
            )*
        }
    };
}

test! {
r#"2
3 4"# => r#"3.5"#,
r#"3
500 300 200"# => r#"375"#,
r#"5
138 138 138 138 138"# => r#"138"#,
}

fn cmp_f64(a: &f64, b: &f64) -> std::cmp::Ordering {
    if a.is_nan() {
        return std::cmp::Ordering::Greater;
    }
    if b.is_nan() {
        return std::cmp::Ordering::Less;
    }
    if a < b {
        return std::cmp::Ordering::Less;
    } else if a > b {
        return std::cmp::Ordering::Greater;
    }
    return std::cmp::Ordering::Equal;
}

fn pot(v: Vec<f64>) -> Vec<f64> {
    let mut value = v.clone();

    if value.len() == 1 {
        value.to_vec()
    } else {
        value.sort_by(cmp_f64);

        let a = (value[0] + value[1]) / 2f64;
        value.push(a);

        println!("{:?}", value);
        println!("{:?}", value[2..].to_vec());
        println!("--------------");
        pot(value[2..].to_vec())
    }
}

fn solve(src: &str) -> String {
    input! {
        source = src,
        n: usize,
        v: [f64; n]
    }

    let nv = pot(v);

    nv[0].to_string()
}