#include [[nodiscard]] static inline constexpr std::vector prepare(const uint_fast32_t N, const std::vector& A) noexcept { std::array count_of = { 0, }; for (uint_fast32_t i = 0; i != N; ++i) { [[assume(A[i] >= -1000 && A[i] <= 1000)]]; ++count_of[A[i] + 1000]; } std::vector _A(N, 0); for (int_fast32_t i = 0, j = 0; i != 2001; ++i) while (count_of[i] != 0) _A[j] = i - 1000, --count_of[i], ++j; return _A; } [[nodiscard]] static inline constexpr double solve(const uint_fast32_t N, const std::vector& _A) noexcept { [[assume(std::is_sorted(_A.begin(), _A.end()))]]; if (N & 1) return _A[N / 2]; else return (_A[N / 2 - 1] + _A[N / 2]) / 2.0; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); uint_fast32_t N; std::cin >> N; std::vector A(N); for (uint_fast32_t i = 0; i != N; ++i) std::cin >> A[i]; std::cout << std::fixed << std::setprecision(10) << solve(N, prepare(N, std::move(A))) << '\n'; return 0; }