#include<iostream>using namespace std;
int main() { int n; while(cin >> n) { int c = 0; int maxc = 0; for (int i = 0; i < n; i++) { cin >> c; if (c > maxc) { maxc = c; }} cout << maxc << endl;}return 0;}