#include<iostream>
#define f0n for (int i = 0; i < n; i++)
using namespace std;
int main() {
int arr[100], n, maximum = -1e9;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for (int i = 0; i < n; i++) {
maximum = max(maximum, arr[i]);
}
cout << maximum;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNkZWZpbmUgZjBuIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKCWludCBhcnJbMTAwXSwgbiwgbWF4aW11bSA9IC0xZTk7CgljaW4gPj4gbjsKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJY2luID4+IGFycltpXTsKCX0KCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJbWF4aW11bSA9IG1heChtYXhpbXVtLCBhcnJbaV0pOwoJfQoJY291dCA8PCBtYXhpbXVtOwp9