import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
//auto PS = new Tuple!(long,string)[](M);
//x[]=1;でlong[]全要素1に初期化
void main()
{
    auto n = lread();
    auto a = aryread();
    auto b = aryread();
    auto sum_a = a.sum();
    // writeln(a.sum());
    // writeln(a);
    // writeln(b);
    auto tmp = new long[](n);
    // writeln(tmp);
    foreach (i; 0 .. n)
    {
        tmp[i] = a[i] - b[i];
    }
    // writeln(tmp);
    if (func(tmp))
    {
        writeln(0);
        return;
    }
    auto tmp_so = tmp.sort();
    // writeln(tmp_so);
    long sum_m;
    foreach (i; 0 .. n)
    {
        if (tmp_so[i] < 0)
        {
            sum_m += tmp_so[i];
        }
    }
    // writeln(sum_m);
    long cntcnt;
    foreach (i; 0 .. n)
    {
        if (tmp_so[i] < 0)
        {
            cntcnt += 1;
        }
    }
    long cnt;
    foreach_reverse (i; 0 .. n)
    {
        if (sum_m < 0)
        {
            sum_m += tmp_so[i];
            cnt += 1;
        }
        else
        {
            break;
        }
    }
    if (sum_m >= 0)
    {
        writeln(cntcnt + cnt);
    }
    else
    {
        writeln(-1);
    }
}

auto func(long[] x)
{
    foreach (i; 0 .. x.length)
    {
        if (x[i] >= 0)
        {
            continue;
        }
        else
        {
            return false;
        }
    }
    return true;
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
