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