n = gets.chomp.to_i

ar = gets.chomp.split(' ').map(&:to_i)
br = gets.chomp.split(' ').map(&:to_i)

diffs = ar.zip(br).map { |a,b| a-b }.reject{ |n| n == 0 }
# a, b, c

diffs = diffs.sort

if diffs.inject(0){|sum,x| sum + x } < 0
  puts '-1'
  exit 0
end


d = 0
changes = 0
while !diffs.empty?
  if 0 <= d
    s = diffs.shift

    if 0 <= s
      puts changes
      exit 0
    end

    d = s + d
  else
    s = diffs.pop
    if s < 0
      puts '-1'
      exit 0
    end

    d = s + d
  end

  changes += 1
end

puts changes