<?php
  
while ($line = fgets(STDIN)) {
   $stdin[] = trim($line);
}
#$v2 = str_split($stdin[0]);
#$v2 = explode(" ", $stdin[0]);

#dream dreamer erase eraser

$nums = explode(" ", $stdin[1]);

$max = max($nums);

rsort($nums);

unset($nums[0]);

$avg = array_sum($nums) / count($nums);
  
$ans = ($max + $avg) / 2;

echo $ans . PHP_EOL;



