#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int main() {
  int n;
  cin >> n;
  int a[105];
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << max(0, a[0]);
}
