#include <bits/stdc++.h>
using namespace std;
long long x,n,i,ln;
int main()
{
freopen("songuyen.int","r",stdin);
freopen("songuyen.out","w",stdout);
cin>>n;
ln=LLONG_MIN;
for (i=1; i<=n; i++)
{
cin>>x;
ln=max(ln,x);
}
cout<<ln;
return 0;
}
const fi='songuyen.int'
fo='songuyen.out'
var f1,f2:text;
x,n,i,ln:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(n);
ln:=-3200;
for i:=1 to n do
begin
readln(x);
if ln<x then ln:=x;
end;
writeln(f2,ln);
close(f1);
close(f2);
end.