#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int size;
  cin >> size;
  int arr[size];
  int ans = 0;
  int found = 0;
  int x;
  for (int i = 0; i < size; ++i) {
    cin >> x;
    arr[i] = x;
  }
  for (int i = 0; i < size; ++i) {
  }
  int myArraySize = sizeof(arr) / sizeof(int);
  int *end = arr + myArraySize;
  for (int i = 1; i <= size; ++i) {
    int *result = std::find(arr, end, i);
    if (result != end) {
      found++;
    } else if (result == end) {
      ans = i;
      cout << ans << endl;
      break;
    }
  }
  if (found == size) {
    cout << ++size;
  } else
    return 0;
}
