read n;
for i in `seq $n`;do
	read s;
	a=(${a[@]} $s);
done
read m;
for i in `seq $m`;do
	read s;
	b=(${b[@]} $s);
done
s=0;
for i in ${a[@]};do
	t=0;
	for j in ${a[@]};do
		if [ $i = $j ];then
			t=$[t+1];
		fi
	done
	for j in ${b[@]};do
		if [ $i = $j ];then
			t=$[t-1];
		fi
	done
	if [ $s -lt $t ];then
		s=$t;
	fi
done
echo $s
