#include <iostream>
#include <set>
#include <utility>
using namespace std;
long long a[100010],b[100010],sum1 = 0,sum2 = 0,ans = 0,c = 0,d = 0;
multiset<long long> s;
int main(){
	int i,n;
	cin >> n;
	for(i=0;i<n;i++){
		cin >> a[i];
		sum1 += a[i];
	}
	for(i=0;i<n;i++){
		cin >> b[i];
		sum2 += b[i];
	}
	if(sum1<sum2){
		cout << -1 << endl;
		return 0;
	}
	for(i=0;i<n;i++){
		if(a[i]>=b[i]){
			s.insert(a[i] - b[i]);
		}else{
			c += a[i];
			d += b[i];
		}
	}
	while(s.size()){
		auto it = s.begin();
		sum2 += *it;
		if(sum1>=sum2){
			s.erase(it);
			ans++;
		}else{
			cout << n - ans << endl;
			return 0;
		}
	}
	cout << n - ans << endl;
}