#include <bits/stdc++.h>
int main() {
  int n;
  int a[5];
  std::cin >> n;
  for (int i = 0; i < n; i++) std::cin >> a[i];
  unsigned int min = -1, max = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] < min) min = a[i];
    if (a[i] > max) max = a[i];
  }
  int result = (min + max) / 2;
  std::cout << result;
}
