input = STDIN.read.split("\n").map{|l| l.split(" ").map{|a| a.to_i}}

N = input[0][0]
A = input[1]
B = input[2]

short_cnt = 0
short_score = 0

reserves = []

for i in 0..(A.length - 1)
    a = A[i]
    b = B[i]
    if a == b
        next
    end
    if a < b
        short_cnt = short_cnt + 1
        short_score = short_score + (b - a)
    else
        reserves.push(a - b)
    end
end

reserves =  reserves.sort.reverse

changed_cnt = 0
if short_cnt > 0 
    for i in 0..(reserves.length - 1)
        short_score = short_score - reserves[i]
        changed_cnt = changed_cnt + 1

        if short_score <= 0
            break
        end
    end
end

if short_score > 0
    puts -1
else
    puts (changed_cnt + short_cnt)
end
