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

int A[100000], B[100000];

int main() {
	int N;
	cin >> N;
	for (int i = 0; i < N; i++) cin >> A[i];
	for (int i = 0; i < N; i++) cin >> B[i];

	int ans = 0;
	long long s = 0;
	vector<int> v;
	for (int i = 0; i < N; i++) {
		if (A[i] < B[i]) {
			s += B[i] - A[i];
			ans++;
		} else {
			v.push_back(A[i] - B[i]);
		}
	}
	sort(v.rbegin(), v.rend());

	for (int i = 0; i < v.size(); i++) {
		if (s <= 0) break;
		s -= v[i];
		ans++;
	}

	cout << (s <= 0 ? ans : -1) << endl;
	return 0;
}
