#include
#include
using namespace std;
int main() {
int n;
cin>>n;
int largest;
if(n >= 0)
{
int arr[n];
for(int i = 0;i<n;i++)
{
cin>> arr[i];
}
largest = arr[0];
for(int i = 0;i<n;i++)
{
if(arr[i] > -1000000000 && arr[i] < 1000000000)
{
if(arr[i] > largest)
{
largest = arr[i];
}
}
}
}
return largest;
}