N = gets.to_i
A = gets.strip.split.map(&:to_i)
B = gets.strip.split.map(&:to_i)
a = []

for i in 0..N-1
    a[i] = A[i] - B[i]
end

a.sort!

i = 0
b = 0

while a[i] < 0
    b -= a[i]
    i += 1
end

j = 0
c = 0

while b > c && j <= N-1
    c += a[N-1-j]
    j += 1
end

if A.inject(:+) < B.inject(:+)
    puts -1
else
    puts j+i  
end
