#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  long long x = arr[0];
  if (x != 1) {
    cout << 1 << endl;
    return 0;
  } else {
    for (int j = 1; j < n; j++) {
      if (arr[j] > arr[j - 1] + 1) {
        cout << arr[j - 1] + 1;
        return 0;
      }
    }
  }
  cout << arr[n - 1] + 1 << endl;
  return 0;
}
