#include <cstdio>

int N,X,Y,Z;
bool a[101]={false},b[101]={false},c[101]={false},p[101]={false};


int main(){
	scanf("%d",&N);
	scanf("%d",&X);
	int v;
	for(int i = 0; i < X; i++){
		scanf("%d",&v);
		a[v] = true;
	}
	scanf("%d",&Y);
	for(int i = 0; i < Y; i++){
		scanf("%d",&v);
		b[v] = true;
	}
	scanf("%d",&Z);
	for(int i = 0; i < Z; i++){
		scanf("%d",&v);
		c[v]= true;
	}
	int ans = 0;
	for(int i = 1; i <= N; i++){
		p[i] = (!a[i] && c[i]) || (b[i] && c[i]);
		if(p[i]){
			ans++;
		}
	}
	printf("%d\n",ans);
	return 0;
}

