#include <bits/stdc++.h>
template <typename T>
T power(T e, T n, T m) {
  T x = 1, p = e;
  while (n) {
    if (n & 1) x = mod(x * p, m);
    p = mod(p * p, m);
    n >>= 1;
  }
  return x;
}
template <typename T>
T InverseEuler(T a, T m) {
  return (a == 1 ? 1 : power(a, m - 2, m));
}
template <typename T>
T gcd(T a, T b) {
  return __gcd(a, b);
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
using namespace std;
const int MAX = 1005;
vector<long int> A;
int main() {
  int N, i;
  cin >> N;
  A.resize(N);
  for (i = 0; i < N; i++) cin >> A[i];
  sort(A.begin(), A.end());
  if (A[0] != 1) A[0] = 1;
  for (i = 1; i < N; i++) {
    if (A[i] - A[i - 1] > 1) {
      A[i] = A[i - 1] + 1;
    }
  }
  long int num;
  bool flag = 0;
  for (i = 1; i < N && !flag; i++) {
    if (A[i] - A[i] > 1) {
      num = A[i];
      flag = 1;
    }
  }
  if (flag == 1) {
    cout << num - 1 << "\n";
  } else {
    cout << A[N - 1] + 1 << "\n";
  }
}
