N=io.read"*n"
A={}
for i=1,N do A[i]=io.read"*n"end
B={}
for i=1,N do B[i]=io.read"*n"end
as=0
bs=0
D={}
for i=1,N do
as=as+A[i]
bs=bs+B[i]
D[i]=A[i]-B[i]
end
if(as<bs)then print(-1)return end

table.sort(D)

dms=0
for i=1,N do if(D[i]>=0)then break end dms=dms+D[i] end

i=1
while(D[i]<0)do
	i=i+1
end

j=N
while(dms<0 and j>0)do
	dms=dms+D[j]
	j=j-1
end

print(i+N-j-1)