#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& x : a) cin >> x;
  sort(a.begin(), a.end());
  cout << a[0];
}
