#include <bits/stdc++.h>
using namespace std;
int a[1000000];
int main() {
  int t, z = 0, l, i = 0, len;
  int n, k = 0, m = 0, bam = 0, dan = 0, ans = 0;
  scanf("%d", &n);
  for (l = 0; l < n; l++) scanf("%d", &k), a[k] = 1;
  l = 1;
  while (a[l]) l++;
  printf("%d", l);
  return 0;
}
