import sys,heapq input=lambda:sys.stdin.readline().rstrip() N=int(input()) L=list(map(int,input().split())) K=list(map(int,input().split())) check=[] M=max(K) h=[] for i in range(N): heapq.heappush(h,[-L[i],1]) while len(check)