#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int Tests = 1;
  while (Tests--) {
    long long int N;
    cin >> N;
    vector<long long int> A(N);
    for (long long int i = 0; i < N; i++) cin >> A[i];
    if (N == 1) cout << A[0] << endl;
    if (N == 3) {
      sort((A).begin(), (A).end());
      cout << A[1] << endl;
    }
    if (N == 5) {
      sort((A).begin(), (A).end());
      cout << A[2] << endl;
    }
  }
}
