#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

ll a[100010],b[100010],sa,ans,su;
vector<ll>yoy;
int main() {
	ll n;
	cin>>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++){
		if(b[i]>a[i]){
			sa+=b[i]-a[i];
			ans++;
		}
		else{
			yoy.push_back(a[i]-b[i]);
			su+=a[i]-b[i];
		}
	}
	if(sa>su){
		cout << -1;
		return 0;
	}
	sort(yoy.begin(),yoy.end());
	reverse(yoy.begin(),yoy.end());
	for(int i=0;yoy.size();i++){
		if(sa<=0){
			break;
		}
		ans++;
		sa-=yoy[i];
	}
	cout << ans;
	return 0;
}