#include <stdio.h>

#define N 10000

int s[N],t[N];
int n,m;

int linear(){
	int i,j;
	int count=0;
	for(i=0;i<m;i++){
		s[n] = t[i];
		j = 0;
		while(s[j] != t[i]){
			j++;
		}
		if(j == n) count++;
	}
	return count++;
}

int main(){
	int i;
	char space;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d%c",&s[i],&space);
	}
	scanf("%d",&m);
	for(i=0;i<m;i++){
		scanf("%d",&t[i]);
	}
	int c = linear();
	printf("%D\n",m - c);
	return 0;
}