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