#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[1000000];
  for (int i = 0; i <= 1000000; i++) {
    arr[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    arr[x] = 1;
  }
  int ans = 0;
  for (int i = 1; i <= 1000000; i++) {
    if (arr[i] == 0) {
      ans = i;
      break;
    }
  }
  cout << ans << endl;
}
