#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
	int n;
	cin>>n;
	long long a[n],b[n],s=0LL,r=0LL;
	vector<long long> memo;
	int ans=0;
	for (int i = 0; i < n; ++i)
	{
		cin>>a[i];
		s+=a[i];
	}
	for (int i = 0; i < n; ++i)
	{
		cin>>b[i];
		s-=b[i];
		if (a[i]<b[i])
		{
			r+=b[i]-a[i];
			++ans;
		}
		else
		{
			memo.push_back(a[i]-b[i]);
		}
	}
	if (s<0)
	{
		cout<<"-1\n";
		return 0;
	}
	sort(memo.begin(), memo.end());
	reverse(memo.begin(), memo.end());
	for (auto v:memo)
	{
		if (r<=0)
		{
			break;
		}
		++ans;
		r-=v;
	}
	cout<<ans<<endl;
	return 0;
}
