from bisect import * N,K,P=map(int,input().split()) A=list(map(int,input().split())) A.sort(reverse=True) B=list(map(int,input().split())) B.sort() L,R=0,P while L>1 C=0 x,y,z=0,0,0 for i in range(N): while x=A[i]: C+=x+y-z else: C+=y-z if C>=K: R=M else: L=max(L+1,M) print(L)