#include <bits/stdc++.h>
using namespace std;

int main (void){
	long long int n,i,a[100004],b[100004],c[100004],suma=0,sumb=0,fn=0,fsum=0,ans;
	cin >> n;
	for(i=0;i<n;i++) {
		cin >> a[i];
		suma+=a[i];
	}
	for(i=0;i<n;i++) {
		cin >> b[i];
		sumb+=b[i];
	}
	if(suma<sumb){
		cout << "-1" << endl;
		return 0;
	}
	for(i=0;i<n;i++){
		if(a[i]<b[i]){
			fn++;
			fsum+=(b[i]-a[i]);
			c[i]=0;
		} else {
			c[i]=a[i]-b[i];
		}
	}
	ans=fn;
	if(fn==0){
		cout << "0" << endl;
		return 0;
	}
	sort(c,c+n);
	for(i=n-1;i>=0;i--){
		fsum=fsum-c[i];
		ans++;
		if(fsum<=0) break;
	}
	cout << ans << endl;
	return 0;
}