#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
long long ans;
long long a[200];
double val;
double dif = 1000;
signed main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    val += a[i];
  }
  val /= (double)n;
  for (long long i = 0; i < n; i++) {
    if (abs(a[i] - val) < dif) {
      dif = abs(a[i] - val);
      ans = i;
    }
  }
  cout << a[ans] << endl;
  return 0;
}
