#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[n];
cin>>n;
for (int i=1; i<=n; i++)
cin>>a[i];
sort(a, a+n);
cout<<a[n-1];
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKSB7CglpbnQgbiwgYVtuXTsKCWNpbj4+bjsKCWZvciAoaW50IGk9MTsgaTw9bjsgaSsrKQoJCWNpbj4+YVtpXTsKCXNvcnQoYSwgYStuKTsKCWNvdXQ8PGFbbi0xXTsKCXJldHVybiAwOwp9