#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, index, n;
  cin >> n;
  int a[n];
  int tmp;
  for (i = 1; i <= n; i++) cin >> a[i];
  if ((n == 1) && (a[1] == 1)) index = 2;
  for (i = 1; i <= n; i++) {
    for (j = i + 1; j <= n; j++)
      if (a[i] > a[j]) {
        int tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
  }
  if (a[1] != 1)
    index = 1;
  else
    for (i = 1; i <= n; i++)
      if (a[i] != a[i + 1] - 1) {
        index = a[i] + 1;
        break;
      }
  cout << index;
}
