#include <stdio.h>
int find_max_element(int *ptr, int n) {
int* pNext = ptr;
int MaxVal = *pNext;
for( int au4_ForC=0; au4_ForC<n; au4_ForC++){
if(MaxVal < *pNext){
MaxVal = *pNext;
}
pNext++;
}
// Your logic here
return MaxVal;
}
int main() {
int n;
scanf("%d", &n);
int arr[100];
for (int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
int result = find_max_element(arr, n);
printf("%d", result);
return 0;
}