#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  bool pan[3000 + 1] = {false};
  scanf("%d", &t);
  while (t-- > 0) {
    int n;
    scanf("%d", &n);
    pan[n] = true;
  }
  bool ck = false;
  for (int i = 1; i <= 3000; i++) {
    if (!pan[i]) {
      printf("%d\n", i);
      ck = true;
      break;
    }
  }
  if (!ck) printf("3001\n");
  return 0;
}
