#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long Max(0), Min(1000000000);
  long long p;
  for (int i = 1; i <= n; i++) {
    cin >> p;
    Min = min(Min, p);
    Max = max(Max, p);
  }
  cout << Min + (Max - Min) / 2;
}
