import heapq n=int(input()) h=list(map(int,input().split())) #print(h) lef=n-1 rig=n+80 S=sum(h) while(rig-lef>1) : mid=(rig+lef)//2 hq=[] if(mid<=60 and 2**mid-10) : heapq.heappush(hq,-(p-dec)) if(len(hq)==0) : rig=mid else : lef=mid print(rig)