n = gets.to_i
a = gets.split.map(&:to_i)
b = gets.split.map(&:to_i)
c = Array.new(n){|i|a[i]-b[i]}.sort
m = 0
ans = 0
for i in 0..n-1
    break if c[i] >= 0
    m -= c[i]
    ans += 1
end
(n-1).downto(0) do |i|
    break if m <= 0
    m -= c[i]
    ans += 1
end
if c.inject(:+) >= 0
    puts ans
else
    puts "-1"
end