use strict; use warnings; my $n = <>; my $line = <>; chomp $line; my @array = split / /, $line; @array = sort {$a <=> $b} @array; my $ans; if($n % 2 == 0) { $ans = $array[$n / 2]; $ans += $array[($n / 2) - 1]; $ans /= 2; } else { $ans = $array[($n - 1) / 2]; } print "$ans\n"; exit;