const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void (async function () {
const n = Number(await readline());
const arrA = (await readline()).split(" ").map(Number);
const arrB = (await readline()).split(" ").map(Number);
let res = 0;
arrA.sort((a, b) => a - b);
arrB.sort((a, b) => a - b);
while (arrA.length > 0) {
let idxA = 0;
let idxB = 0;
while (arrA[idxA] > arrB[idxB]) {
idxB++;
}
if (idxB == 0) {
arrA.shift();
arrB.pop();
res--;
} else {
arrA.shift();
arrB.splice(idxB - 1, 1);
res++;
}
}
console.log(res);
})();