import heapq n=int(input()) h=list(map(int,input().split())) #print(h) lef=-1 rig=80 while(rig-lef>1) : mid=(rig+lef)//2 hq=[] heapq.heapify(hq) for i in range(n) : heapq.heappush(hq,-h[i]) for i in range(mid-1,-1,-1): if(len(hq)==0) : break dec=1<0) : heapq.heappush(hq,-(p-dec)) if(len(hq)==0) : rig=mid else : lef=mid print(rig)