var
a,b:array[1..2000]of integer;
s,n,m,i,j,t:longint;
begin
read(n,m);
s:=m;
for i:=1 to n do
readln(a[i]);
for i:=1 to m do
readln(b[i]);
for i:=1 to n-1 do
for j:=i+1 to n do
if b[i]<b[j]then begin
t:=b[i];
b[i]:=b[j];
b[j]:=t;
end;
for i:=1 to n do
for j:=1 to m do
if (a[i]>b[j])and(b[j]<>0) then
begin
s:=s-1;
b[j]:=0;
break;
end;
writeln(s);
end.