#include <bits/stdc++.h>
using namespace std;
template <class T>
using vt = vector<T>;
template <class T>
using vvt = vector<vector<T>>;
int main() {
  int N;
  vector<int> house(N);
  for (int i = 0; i < N; i++) cin >> house[i];
  int max = house[0];
  for (int i = 1; i < N; i++) {
    if (max < house[i]) max = house[i];
  }
  cout << max << endl;
  return 0;
}
