import std.stdio;
import std.math;

void main()
{
	int n, m;
	int[] a, b;
	scanf("%d %d", &n, &m);
	a.length = n;
	b.length = m;
	foreach (i; 0 .. n) scanf("%d", &a[i]);
	foreach (i; 0 .. m) scanf("%d", &b[i]);
	int result;
	while (b.length) {
		if (a.length == 0) break;
		if (b[0] < a[0]) {
			b = b[1..$];
		} else {
			a = a[1..$];
			b = b[1..$];
		}
	}
	writeln(a.length);
}