#include<bits/stdc++.h>
using namespace std;
int main(void){
  int n;
  cin >> n;
  long loss=0;
  int count=0;
  vector<int> a(n);
  vector<int> b(n);
  vector<int> c(n);
  for(int i = 0;i<n;i++){
    cin >> a[i];
  }
  for(int i = 0;i<n;i++){
    cin >> b[i];
  }
  for(int i = 0;i<n;i++){
    c[i]=a[i]-b[i];
    if(c[i]<0){
      count++;
      loss+=c[i];
    }
  }
  if(count==0){
    cout << 0;
    return 0;
  }
  sort(c.begin(),c.end());
  int i=n-1;
  while(loss<0&&c[i]>0){
    loss+=c[i];
    i--;
    count++;
  }
  if(loss<0)
    cout << -1;
  else
    cout << count;
  return 0;
}
