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