#include <bits/stdc++.h>
using namespace std;
int mn = 3000, mx = 0;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    mx = max(mx, x);
    mn = min(mn, x);
  }
  assert((mx + mn) % 2 == 0);
  cout << (mx + mn) / 2 << endl;
  return 0;
}
