var n,s,r,i,j:integer;
    a,b:array[1..10] of integer;
begin
read(n,s,r);
for i:=1 to s do read(b[i]);
for i:=1 to r do read(a[i]);
for i:=1 to s do for j:=1 to r do if (b[i]<>a[j]) and ((b[i]-a[j]=1) or (a[j]-b[i]=1)) then begin s:=s-1; a[j]:=0; b[i]:=0; end;
writeln(s);
readln;
end.
