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

struct it{
	int a , b , c;
};

vector<it> v;
int n;

int32_t main(){
	cin>>n;
	v.resize(n);
	for(int i = 0 ; i < n ; i ++){
		cin>>v[i].a;
	}
	for(int i = 0 ; i < n ; i ++){
		cin>>v[i].b;
		v[i].c = v[i].a - v[i].b;
	}
	sort(v.begin() , v.end() , [&](it a , it b){
		return a.c < b.c;
	});
	int X = 0;
	int R = 0;
	for(int i = 0 ; i < n ; i ++){
		if(v[i].c >= 0) break;
		R++;
		X += -v[i].c;
	}
	for(int j = n- 1 ; j >= 0 ; j --){
		if(v[j].c <= 0) break;
		if(X <= 0) break;
		R++;
		X -= v[j].c;
	}
	if(X > 0){
		cout<<-1<<endl;
	}
	else{
		cout<<R<<endl;
	}
}