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;

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 D = readln.split.map!(to!long).array;
    D.sort!"a > b";

    auto C = new long[](N);

    for (int i = 0, j = 0, k = -1; k < N; ++k) {
        if (i + j > 0) C[k] = A[i] + B[j];
        if (i == N) ++j;
        else if (j == N) ++i;
        else if (A[i] + B[j+1] >= A[i+1] + B[j]) ++j;
        else ++i;
    }

    int ans = 0;

    for (int i = 0, j = 0; i < N && j < N; ) {
        if (C[i] >= D[j]) {
            ++ans;
            ++i;
            ++j;
        } else {
            ++j;
        }
    }

    ans.writeln;
}