#include<iostream>
#include<cstdlib>
#include<algorithm>
using namespace std;
int main(){
int n;
cin>>n;
int classroom[n];
int max_classroom=0;
for(int i=0;i<n;i++){
cin>>classroom[i];
}
for(int i=0;i<n;i++){
max_classroom=std::max(max_classroom,classroom[i]);
}
cout<<max_classroom<<endl;
}