#include <bits/stdc++.h>
#define ll long long
#define int long long
#define double long double
#define endl "\n"
#define fi first
#define se second
#define MASK(i) (1LL << (i))
#define BIT(x, i) (((x) >> (i)) & 1)
#define creby_ThienNhan return 0;
#define qnorz ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int LimN=1e6+5;
const int N=1e5+5;
const int M=1e3+5;
const int BASE=256;
const int mod=1e9+7;
char d4c[4]={'R','D','L','U'};
ll d4x[4]={0,1,0,-1};
ll d4y[4]={1,0,-1,0};
ll d4x_tuong[4]={-2,-2,2,2};
ll d4y_tuong[4]={-2,2,-2,2};
ll d8x[8]={0,1,-1,0,-1,1,1,-1};
ll d8y[8]={1,0,0,-1,-1,1,-1,1};
ll d8x_ma[8]={-1,-1,+1,+1,-2,-2,+2,+2};
ll d8y_ma[8]={-2,+2,-2,+2,-1,+1,-1,+1};
template<class X, class Y>
bool maximize(X& x, const Y y) {
    if (y > x) {x = y; return true;}
    return false;
}
template<class X, class Y>
bool minimize(X& x, const Y y) {
    if (y < x) {x = y; return true;}
    return false;
}
ll pow1(ll a, ll b, ll c){
    ll tich = 1;
    a = a % c;
    for (; b > 0; b >>= 1 , a = a * a % c){
        if (b & 1) tich = tich * a % c;
      }
    return tich;
}
ll pow2(ll a, ll b, ll mod) {
    ll res = 1;
    a %= mod;
    while(b > 0) {
        if(b & 1) res = (res * a) % mod;
        a = (a * a) % mod;
        b >>= 1;
    }
    return res;
}
namespace SUB1{

}
namespace SUB2{

}
namespace SUB3{

}
int n;
int a[LimN];
void solve() {
    //Bước 1:
    cin >> n;
    for (int i=1; i<=n; i++) cin >> a[i];
    //Bước 2:
    int max1=0;
    for (int i=1; i<=n; i++) {
        if (max1 < a[i]) max1=a[i];
    }
    // Bước 3:
    cout << max1 << endl;
}
signed main() {
    qnorz
    ll t=1;
    while (t--) {
        solve();
    }
    creby_ThienNhan
}

