function main(input){
  var n = parseInt(input[0]);
  var a = input[1].split(' ').map(s=>parseInt(s));
  var b = input[2].split(' ').map(s=>parseInt(s));
  
  if(a.reduce((n, sum) => n+sum, 0) < b.reduce((n, sum) => n+sum, 0)) {
    console.log(-1);
    return;
  }

  var count = 0;
  var diff = 0;
  var arr = [];

  for (var i=0; i<n; i++) {
    if (a[i] < b[i]) {
      count++;
      diff += b[i] - a[i];
      arr.push(0);
    } else {
      arr.push(a[i] - b[i]);
    }
  }

  arr=arr.sort((k,j) => j-k);
  var aa = 0;
  var i = 0;
  while(aa < diff) {
    aa += arr[i++];
    count++;
  }

  console.log(count);
}

var input = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  input += chunk;
});
process.stdin.on('end', function() {
  input = input.split('\n');
  main(input);
});
