#include<bits/stdc++.h>
using namespace std;
using LL=long long;
int main(){
  int N;cin>>N;
  vector<LL>A(N),B(N);
  for(LL &a:A)cin>>a;
  for(LL &b:B)cin>>b;
  vector<LL>t;
  LL u=0,c=0;
  for(int i=0;i<N;i++){
    if(A[i]>=B[i])
      t.push_back(A[i]-B[i]);
    else{
      u+=B[i]-A[i];
      c++;
    }
  }
  sort(t.begin(),t.end(),greater<LL>());
  LL sum=0;
  for(int i=0;i<=t.size();sum+=t[i],i++){
    if(sum>=u){
      cout<<c+i<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;
}