#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#define int long long
using namespace std;

int a[100000], b[100000], c[100000];
signed 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];
	}
	for (int i = 0; i < n; i++) {
		c[i] = a[i] - b[i];
	}
	int sum = 0, ans = 0;
	for (int i = 0; i < n; i++) {
		if (c[i] < 0) {
			sum += -(c[i]);
			ans++;
		}
	}
	sort(c, c + n);
	reverse(c, c + n);
	for (int i = 0; i < n; i++) {
		if (sum <= 0)break;
		if (c[i] <= 0)break;
		ans++;
		sum -= c[i];
	}
	if (sum <= 0)cout << ans << endl;
	else puts("-1");
}