n=gets.to_i
a=gets.split.map(&:to_i)
b=gets.split.map(&:to_i)

minus=[]
plus=[]
flag=0
sum=0
for i in 0..n-1
    v=a[i]-b[i]
    if v<0
        flag=1
    end
    sum+=v
    if v>0
        plus<<v
    elsif v<0
        minus<<v
    end
    
end

if flag==0
    p 0
    exit
elsif sum<0
    p -1
    exit
end
count=0
count+=minus.length
plus.sort!
plus=plus.reverse

minus_all=minus.inject(&:+)
plus_all=0
i=0
while minus_all<0
    if i>=plus.length
        p -1
        exit
    end
    minus_all+=plus[i]
    count+=1
    i+=1
end

p count
    