'use strict';
function main(input) {
  const args = input.split('\n'),
        N = parseInt(args[0]),
        D = args[1].split(' ');
  for (let i = 0; i < N; ++i) {
    D[i] = parseInt(D[i]);
  }
  D.sort();
  let value = 0;
  for (let i = 0; i < N; ++i) {
    if (i < N-2) {
      value += D[i] * Math.pow(2, -1-i);
    } else {
      value += D[i] * Math.pow(2, -N+1);
    }
  }
  console.log(value);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));