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