#include <bits/stdc++.h>
int main(void) {
  int n;
  std::cin >> n;
  std::vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    std::cin >> a[i];
  }
  std::sort(a.begin(), a.end());
  std::cout << (a[0] + a[n - 1]) / 2 << std::endl;
  return 0;
}
