#include <bits/stdc++.h>
using namespace std;
long long n, m, k, t = 1, x, y, z, l, r, w, q, ct, ans, f;
string s, p;
long long a[205];
set<long long> si;
queue<long long> qi;
map<long long, long long> mi;
vector<long long> vi;
priority_queue<long long> pqdi;
priority_queue<long long, vector<long long>, greater<long long>> pqai;
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> x;
    ans = max(ans, x);
  }
  cout << ans;
}
