#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int p1, p2, n, element, result, ma, gap, carry;
  cin >> n;
  map<int, int> mp1;
  map<int, int>::iterator it, p_it;
  ma = 0;
  for (p1 = 0; p1 < n; p1++) {
    cin >> element;
    mp1[element]++;
    ma = max(ma, element);
  }
  mp1[0]++;
  it = mp1.end();
  it--;
  result = ma + 1;
  carry = 0;
  for (; it != mp1.begin(); it--) {
    p_it = it;
    p_it--;
    gap = it->first - p_it->first;
    carry += it->second;
    if (carry >= gap)
      carry -= gap;
    else {
      result -= (gap - carry);
      carry = 0;
    }
  }
  cout << result;
  return 0;
}
