Fox Ciel has n boxes in her room. They have the same size and weight, but they might have different strength. The i-th box can hold at most x_{i} boxes on its top (we'll call x_{i} the strength of the box). 

Since all the boxes have the same size, Ciel cannot put more than one box directly on the top of some box. For example, imagine Ciel has three boxes: the first has strength 2, the second has strength 1 and the third has strength 1. She cannot put the second and the third box simultaneously directly on the top of the first one. But she can put the second box directly on the top of the first one, and then the third box directly on the top of the second one. We will call such a construction of boxes a pile.[Image]

Fox Ciel wants to construct piles from all the boxes. Each pile will contain some boxes from top to bottom, and there cannot be more than x_{i} boxes on the top of i-th box. What is the minimal number of piles she needs to construct?


-----Input-----

The first line contains an integer n (1 ≤ n ≤ 100). The next line contains n integers x_1, x_2, ..., x_{n} (0 ≤ x_{i} ≤ 100).


-----Output-----

Output a single integer — the minimal possible number of piles.


-----Examples-----
Input
3
0 0 10

Output
2

Input
5
0 1 2 3 4

Output
1

Input
4
0 0 0 0

Output
4

Input
9
0 1 0 2 0 1 1 2 10

Output
3



-----Note-----

In example 1, one optimal way is to build 2 piles: the first pile contains boxes 1 and 3 (from top to bottom), the second pile contains only box 2.[Image]

In example 2, we can build only 1 pile that contains boxes 1, 2, 3, 4, 5 (from top to bottom).[Image]

Difficulty: competition

Starter code:

Solutions:
n = int(input())
ar = list(map(int,input().split(' ')))
ar.sort()
s=[]
for i in ar:
	s.sort(reverse=True)
	for j in range(len(s)):
		if i>=s[j]:
			s[j]+=1
			break
	else:
		s.append(1)
print(len(s))


from bisect import bisect_left
input()
s = []
for i in sorted(map(int, input().split())):
    k = bisect_left(s, -i)
    if k == len(s): s.append(-1)
    else: s[k] -= 1
print(len(s))

n = input()
h = [0]
A = sorted(map(int, input().split()))

for x in A:
    if x < min(h):
        h += [1]
    else:
        h[h.index(min(h))]+=1
print(len(h))

n = input()
h = [0]
A = list(map(int, input().split()))
A.sort()

for x in A:
    if x < min(h):
        h += [1]
    else:
        h[h.index(min(h))]+=1
print(len(h))


n = int(input())
val = [[]]
for x in sorted(int(x) for x in input().split()):
    for l in val:
        if x >= len(l):
            l.append(x)
            break
    if len(val[-1]) > 0:
        val.append([])
print(len(val) - 1)


input();print(1+max(x//-~f for x,f in enumerate(sorted(map(int,input().split())))))

import sys
import math

n = int(sys.stdin.readline())
xn = [int(x) for x in (sys.stdin.readline()).split()]



xn.sort()

k = [1]
res = 1
for i in xn[1:]:
    flag = False
    for t in range(res):    
        if(i >= k[t]):
            k[t] += 1
            flag = True
            break
    
    if(flag == False):
        res += 1
        k.append(1)
        
print(res)


def main():
    n = int(input())
    l = sorted(map(int, input().split()))
    res = 0
    while l:
        res += 1
        i, l1 = 0, []
        for x in l:
            if x < i:
                l1.append(x)
            else:
                i += 1
        l = l1
    print(res)


def __starting_point():
    main()

__starting_point()

# coding: utf-8
n = int(input())
ans = 0
li1 = [int(i) for i in input().split()]
li2 = []
while li1:
    li1.sort()
    n = len(li1)
    i = 0
    while i < n:
        if li1[i] < i:
            li2.append(li1[i])
            del(li1[i])
            n -= 1
        else:
            i += 1
    ans += 1
    li1 = li2
    li2 = []
print(ans)


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

nu=0
ans=0

mark=[]
for i in range(0,n):
    mark.append(0)


for i in range(0,n):
    fail=1
    nu=0
    for j in range(0,n):
        if mark[j] == 0:
            fail = 0
            if x[j] >= nu:
                nu+=1
                mark[j]=1
    if fail == 0:
        ans+=1
    else:
        break
print(ans)
        
        
        

    
        
    
    
    


    


    


def main():
    mode="filee"
    if mode=="file":f=open("test.txt","r")
    #f.readline()
    #input()
    get = lambda :[int(x) for x in (f.readline() if mode=="file" else input()).split()]
    [n]=get()
    a=get()
    a.sort()
    p=[[]]
    p[0].append(a[0])
    for i in a[1:]:
        p=sorted(p,key = lambda x:len(x))
        p.reverse()
        found=False
        for j in p:
            if len(j)<=i:
                j.append(i)
                found=True
                break
        if found ==False:
            p.append([i])
    print(len(p))


    if mode=="file":f.close()


def __starting_point():
    main()

__starting_point()

input();print(1+max(x//-~f for x,f in enumerate(sorted(map(int,input().split())))))

from sys import stdin
inFile = stdin
tokens = []
tokens_next = 0

def next_str():
    nonlocal tokens, tokens_next
    while tokens_next >= len(tokens):
        tokens = inFile.readline().split()
        tokens_next = 0
    tokens_next += 1
    return tokens[tokens_next - 1]

def nextInt():
    return int(next_str())

def check(a, n):
    # a must be sorted in decresing order
    if n == 0:
        return 0
    if len(a) <= n:
        return 1
    l = [[i] for i in a[:n]]
    allowed = [i for i in a[:n]]
    ind = 0
    for i in a[n:]:
        ind += 1
        ind %= len(allowed)
        starting_pos = ind
        while allowed[ind] == 0:
            ind += 1
            ind %= len(l)
            if ind == starting_pos:
#                 print(l, 0)
                return 0
        l[ind] += [i]
        allowed[ind] = min(i, allowed[ind] - 1)
#     print(l, 1)
    return 1

def solve(a):
    a.sort(reverse=1)
    n = len(a)
    low = 0
    high = n
    while low + 1 < high:
        m = (low + high) // 2
        if check(a, m):
            high =  m
        else :
            low = m
    return high

n = nextInt()
a = [nextInt() for i in range(n)]

print(solve(a))





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

nb = 0

for i in range(n):
    if l[i] == -1 :
        continue
    h = 1
    nb += 1
    for j in range(i+1,n):
        if l[j]>=h:
            h+=1
            l[j] = -1

print(nb)

n = int(input())
a = [int(x) for x in input().split()]
a.sort()
pile,tc=0,n
visited = [0]*n
while tc != 0:
    tt=0
    for i in range(0,n):
        if a[i]>=tt and visited[i] != 1:
            visited[i]=1
            tt+=1
            tc-=1
    if(tt>0):
        pile+=1
print(pile)


n = int(input())
x = sorted(list(map(int, input().split())))
ans = 1
for i in range(n):
	if(x[i] < i//ans):
		ans += 1
print(ans)


def take_lightest_box(boxes):

    for i in range(101):
        if i in boxes:
            boxes[i] -= 1
            if boxes[i] == 0:
                del boxes[i]
            return i


piles = []


boxes = {}

input()
tmp = input()

x = [int(i) for i in tmp.split(" ")]

for item in x:
    if item in boxes:
        boxes[item] = boxes[item] + 1
    else:
        boxes[item] = 1

while len(boxes) > 0:
    lightest = take_lightest_box(boxes)

    for pile in piles:
        if len(pile) <= lightest:
            pile.append(lightest)
            break
    else:
        piles.append([lightest])


print(len(piles))




n = int(input())
ar = list(map(int, input().split()))
ar.sort()
stack = 0

chosen = [False] * n

for i in range(n):
	chosen[i] = False

for i in range(n):
	if(chosen[i] == False):
		chosen[i] = True
		stack+=1
		box = 1
		for j in range(i, n):
			if(chosen[j] == False and ar[j] >= box):
				chosen[j] = True
				box+=1

print(stack) 	

n=int(input())
a=list(map(int,input().split()))
a.sort()
dp = [0]
for i in a:
    add = False
    for j in range(len(dp)):
        if(dp[j]<=i):
            dp[j]+=1
            add = True
            break
    if not add :
        dp.append(1)
print(len(dp))


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

k = 1
while True:
  for i in range(len(a)):
    if a[i] < (i//k):
      break
  else:
    print(k)
    break
  k += 1

N = int(input())
ar = list(map(int, input().split()))
ar.sort()

a = 1
b = 100
while a < b:
  compliant = True
  k = (a+b) // 2
  for i in range(len(ar)):
    if ar[i] < (i//k):
      compliant = False
      break
  if compliant:
    b = k
  else:
    a = k + 1
  
print(b)

n=int(input())
l=list(map(int,input().split()))
l=sorted(l)
l=l[::-1]
l1=[0]*n
k=0
for i in range(n) :
    if l1[i]!=1 :
        t=l[i]
        p=1
        r=0
        l1[i]==1
        V=[t]
        for j in range(n) :
            if l1[j]==0 and l[j]<t :
                t=l[j]
                l1[j]=1
                V.append(t)
                r=r+1
        for j in range(n-1,-1,-1) :
            if l1[j]!=1 :
                if l[j] in V :
                    q=V.index(l[j])+1
                    if len(V)-q+1<=l[j] :
                        c=0
                        s=-1
                        u=len(V)-q+1
                        for e in range(q-1,-1,-1) :
                            if V[e]>=u+s :
                                s=s+1
                            else :
                                c=1
                                break
                        if c==0 :
                            l1[j]=1
                            V=V[:q-1]+[l[j]]+V[q-1:]
                            
                            
                            
                            
                    
     
        k=k+1
        
print(k)
            
                
    


#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math
n=int(input())
box=[int(x) for x in input().split()]
box.sort()
k=0
for i in range(n):
    if k*(box[i]+1)<=i:
        k+=1
print(k)


input();print(1+max(x//-~f for x,f in enumerate(sorted(map(int,input().split())))))


input();print(1+max(x//-~f for x,f in enumerate(sorted(map(int,input().split())))))