#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
	int n, m = 0;

	cin >> n;
	vector<int> a(n), b(n), d(n);

	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n; i++) {
		cin >> b[i];
		d[i] = a[i] - b[i];
	}

	sort(d.begin(), d.end());
	vector<int>::iterator itr = d.begin();
	long long p = 0;
	
	while (itr != d.end() && *itr < 0) {
		p += *itr;
		m++;
		itr++;
	}

	itr = d.end();
	itr--;

	while (itr != d.begin() && p < 0) {
		p += *itr;
		m++;
		itr--;
	}

	if (p < 0)
		cout << -1 << endl;
	else
		cout << m << endl;

	return 0;
}
