#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long n, temp, index;
  cin >> n;
  std::vector<long long> arr[5000];
  for (int i = 1; i <= n; ++i) {
    cin >> temp;
    arr[temp].push_back(temp);
  }
  for (int i = 1; i <= 3001; ++i) {
    if (arr[i].size() != 1) {
      index = i;
      break;
    }
  }
  cout << index << endl;
  return 0;
}
