#include <bits/stdc++.h>
using namespace std;
int Min = 2140000000, Max = 0, X, N;
int main() {
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> X;
    Min = min(X, Min);
    Max = max(Max, X);
  }
  return 0;
}
