#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, c, arr[1000], b, sum = 1, summ = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  int s = (arr[n - 1] + arr[0]) / 2;
  cout << s << endl;
  return 0;
}
