#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n, a[2100] = {}, b;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  b = (a[0] + a[1]) / 2;
  cout << (b + a[2]) / 2 << "\n";
}
