#include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 50;   int n, a[maxn], ans, maxx = 0;   int main() {     cin >> n;     for (int i = 1; i <= n; i++) {       cin >> a[i];       maxx = max(maxx, a[i]);     }     cout << maxx;     return 0;   }   