#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
short *arr = new short[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int max = arr[0];
if (arr[i] > max) {
max = arr[i];
cout << max;
return 0;}
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
short *arr = new short[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
int max = arr[0];
for (int i = 0; i < n; i++) {
if (arr[i] > max) {
max = arr[i];
}
}
cout << max;
return 0;}