#include <iostream> using namespace std; int main() { int n, a; cin >> n; int maxa = 0; while (n--) { cin >> a; if (a > maxa) maxa = a; } cout << maxa; return 0; }