#include<stdio.h>
int main(void)
{
    int n;
    scanf("%d",&n);
    int *scor=(int *)malloc(sizeof(int)*n);
    int max=0;
    for(int i=0;i<n;i++)
    {
        scanf("%d",&scor[i]);
        max=max>scor[i]?max:scor[i];
    }
    printf("%d",max);
    return 0;
}