#include <bits/stdc++.h> using namespace std; int main(int argc, char** argv) { long int a; while (cin >> a) { unsigned long int b, c=0; for (long int i=0;i<a;i++) { cin >> b; if (b>c) c=b; } cout << c << endl; } }