#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::vector<int> a;
  a.resize(n);
  for (int i = 0; i < n; ++i) std::cin >> a[i];
  std::sort(a.begin(), a.end());
  int res = a[n - 1] + 1;
  for (int i = 0; i < n - 1; ++i)
    if (a[i + 1] - a[i] > 1) {
      res = a[i] + 1;
      break;
    }
  if (a[0] > 1) res = 1;
  std::cout << res;
  return 0;
}
