#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> v;
  for (int i = 0; i < N; i++) {
    int V;
    cin >> V;
    v.push_back(V);
  }
  sort(v.begin(), v.end());
  int res = 0;
  for (int i = 0; i < N / 2; i++) {
    res += (v[i] + v[v.size() - 1 - i]) / 2;
  }
  cout << res << endl;
}
