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)end

table.sort(D)

if(D[1]>=0)then print(0)end

s=0
i,j=1,N
while(true)do
	if(D[i]<0)then
		while(D[i]<0)do
			D[i]=D[i]+D[j]
			D[j]=0
			j=j-1
		end
		if(D[i]>0)then j=j+1 D[j]=D[i] D[i]=0 end
	else
		break
	end
	i=i+1
end
print(i+N-j)