#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
  int n; cin>>n;
  vector<ll> a(n),b(n);
  for(int i=0;i<n;i++){
    cin>>a[i];
  }
  for(int i=0;i<n;i++){
    cin>>b[i];
    a[i]-=b[i];
  }
  vector<ll> plus;
  ll minus=0,ans=0;
  for(int i=0;i<n;i++){
    if(a[i]>0){
      plus.push_back(a[i]);
    }else if(a[i]<0){
      minus-=a[i];
      ans++;
    }
  }
  sort(plus.rbegin(),plus.rend());
  for(int i=0;i<plus.size();i++){
    if(minus>plus[i]){
      minus-=plus[i];
      ans++;
    }else{
      if(minus!=0) ans++;
      cout<<ans<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;
}