Someone gave Alyona an array containing n positive integers a_1, a_2, ..., a_{n}. In one operation, Alyona can choose any element of the array and decrease it, i.e. replace with any positive integer that is smaller than the current one. Alyona can repeat this operation as many times as she wants. In particular, she may not apply any operation to the array at all.

Formally, after applying some operations Alyona will get an array of n positive integers b_1, b_2, ..., b_{n} such that 1 ≤ b_{i} ≤ a_{i} for every 1 ≤ i ≤ n. Your task is to determine the maximum possible value of mex of this array.

Mex of an array in this problem is the minimum positive integer that doesn't appear in this array. For example, mex of the array containing 1, 3 and 4 is equal to 2, while mex of the array containing 2, 3 and 2 is equal to 1.


-----Input-----

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of elements in the Alyona's array.

The second line of the input contains n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^9) — the elements of the array.


-----Output-----

Print one positive integer — the maximum possible value of mex of the array after Alyona applies some (possibly none) operations.


-----Examples-----
Input
5
1 3 3 3 6

Output
5

Input
2
2 1

Output
3



-----Note-----

In the first sample case if one will decrease the second element value to 2 and the fifth element value to 4 then the mex value of resulting array 1 2 3 3 4 will be equal to 5.

To reach the answer to the second sample case one must not decrease any of the array elements.

Difficulty: interview

Starter code:

Solutions:
x=int(input())
l=list(map(int, input().split(' ')))
l.sort()
a=1
for i in l:
    if i>=a:
        a+=1
print(a)


n = int(input())
A = [int(x) for x in input().split()]
A.sort()
mex = 1
for i in range(n):
    if A[i] >= mex:
        A[i] = mex
        mex += 1
print(mex)




n = int(input())
c = list(map(int, input().split()))
c.sort()
m = 1
for i in range(n):
    if m <= c[i]:
        c[i] = m
        m += 1
print(m)


n = int(input())
ai = list(map(int,input().split()))
ai.sort()
num = n
ans = 0
for i in ai:
    num -= 1
    ans += 1
    ans = min(i,ans)
print(ans+1)



n = int(input())
tab = sorted(list(map(int, input().split())))
cmex = 1
for num in tab:
    if num >= cmex:
        cmex += 1

print(cmex)


from collections import defaultdict, deque, Counter, OrderedDict

def main():
    n = int(input())
    l = sorted([int(i) for i in input().split()])
    c = 1
    for i in l:
        if i >= c:
            c += 1
    print(c)












def __starting_point():
    """sys.setrecursionlimit(400000)
    threading.stack_size(40960000)
    thread = threading.Thread(target=main)
    thread.start()"""
    main()
__starting_point()

n = int(input())
data = sorted(list(map(int, input().split())))
min1 = 10 ** 9 + 1
for i in range(n):
    data[i] = min(data[i], i + 1, min1)
    min1 = data[i] + 1
print(data[-1] + 1)

n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = n + 1

i = 0
j = 1

while i < n:
    if a[i] >= j:
        i += 1
        j += 1
    else:
        while i < n and a[i] < j:
            i += 1
        if i != n:
            j += 1
            i += 1

print(j)


n = int(input())

mex = 1
for num in sorted(map(int, input().split())):
    if num >= mex:
        mex += 1

print(mex)

import sys


def main():
    n = int(sys.stdin.readline())
    x = list(map(int, sys.stdin.readline().split()))
    x.sort()

    c = 1
    for i in range(n):
        if x[i] >= c:
            c+=1
    print(c)

main()


n = int(input())
our = list(map(int, input().split()))
our.sort()
our[0] = 1
for i in range(1, n):
    if our[i] > our[i - 1]:
        our[i] = our[i - 1] + 1
print(our[-1] + 1)

read = lambda: map(int, input().split())
n = int(input())
a = sorted(read())
k = 1
for i in range(n):
    if a[i] > k:
        a[i] = k
        k += 1
    elif a[i] == k:
        k += 1
print(k)

n = int(input())
a = sorted(int(x) for x in input().split())
m = 0
for i in range(1, n+1):
    if i > a[i-1] + m:
        m = i - a[i-1]
print(n-m+1)

n=int(input())
a=sorted(map(int,input().split()))
ans=1
for i in range(n):
    if a[i]>=ans: ans+=1
print(ans)

n = int(input())
l = list(map(int,input().split()))
l.sort()
d = set()
l[0] = 1
for i in range(1,n):
    l[i] = min(l[i-1] + 1,l[i])
print(l[n-1]+1)

n=int(input())
l=sorted(map(int,input().split()))
ans=2
l[0]=1
for i in range(1,n):
    if l[i]>l[i-1]: l[i]=l[i-1]+1; ans=l[i]+1
print(ans)

n = int(input())
a = list(map(int, input().split()))
a.sort()

mex = 1
miss = False

i = 0
while i < n:
    while i < n and a[i] < mex:
        i += 1

    if i != n:
        mex += 1

    i += 1

print(mex)


n=int(input())
nombres=list(map(int,input().split()))

nombres.sort()

i=0
entierSuivant=1
while i!=n:
    if nombres[i]>entierSuivant:
        nombres[i]=entierSuivant
        entierSuivant+=1
    elif entierSuivant==nombres[i]:
        entierSuivant+=1
    i+=1

print(entierSuivant)

#!/usr/bin/env python3

from collections import Counter

try:
    while True:
        n = int(input())
        a = sorted(map(int, input().split()))
        t = 1
        for x in a:
            t = min(t, x) + 1

        print(t)

except EOFError:
    pass


n = int(input())
arr = [int(x) for x in input().split()]
arr.sort()
point = 0
for i in range(n):
    if(point<arr[i]):
        point += 1
print(point+1)

n = int(input())
L = sorted([int(i) for i in input().split()])

i = 0
mex = 1
while i < n:
    if mex <= L[i]:
        mex += 1
    i += 1
print(mex)


n = int(input())
a = list(map(int, input().split()))
a.sort()

target = 1
for i in range(n):
    if a[i] >= target:
        target += 1

print(target)


import sys
n=int(input())
z=list(map(int,input().split()))
z.sort()
last=0
for i in range(n):
    if z[i]-last>=2:
        z[i]=last+1
        last+=1
    else:
        last=z[i]
print(z[-1]+1)

n = int(input())
arr = list(map(int, input().split()))
arr.sort()
mex = 1
for i in range(n):
    if arr[i] >= mex:
        arr[i] = mex
        mex = mex + 1
print(mex)

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import time

n   = int(input())
a   = [int(i) for i in input().split()]

start = time.time()

a   = sorted(a)

now = 1

for i in range(n):
    if a[i] >= now:
        a[i] = now
        now  = now + 1

print(now)
finish = time.time()
#print(finish - start)