import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

void main() {
    auto N = readln.chomp.to!int;
    auto A = readln.split.map!(to!long).array;
    auto B = readln.split.map!(to!long).array;

    auto AB = N.iota.map!(i => A[i] - B[i]).array;
    AB.sort();

    int ans = 0;
    long tmp = 0;

    foreach (i; 0..N) {
        if (AB[i] >= 0) break;
        ans += 1;
        tmp += AB[i];
    }

    foreach_reverse (i; 0..N) {
        if (AB[i] <= 0 || tmp >= 0) break;
        ans += 1;
        tmp += AB[i];
    }

    writeln(tmp >= 0 ? ans : -1);
}
