"use strict";
const main = arg => {
  let Nums = arg.split("\n");
  let NumArr = Nums[1].split(" ").map(x=> x*1).sort((a, b) => a - b);
  let tempNum = 0;
  let nextTempNum = 0;
  if(NumArr.length == 2){
	nextTempNum = (NumArr[0] +  NumArr[1])/2
  }
  else {
    for(let i = 2; i < Nums[0]; i++){
      tempNum = (NumArr[i-2] + NumArr[i-1])/2
      nextTempNum = (tempNum + NumArr[i])/2
  	}
  }
  console.log(nextTempNum);
}

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