#include<vector>
#include<iostream>
#include<string>
using namespace std;

//string C[1000] = {};

//	long long dp[2000][2000] = {};
int main(){
//	string t,b;
//	cin >> t >> b;
//	dp[0][0] = 1LL;
//
//	for(int i=0; i<t.size(); i++){
//		for(int j=0; j<b.size(); j++){
//			dp[i+1][j] += dp[i][j];
//			if(t[i] == b[j]){
//				dp[i+1][j+1] += dp[i][j];
//			}
//			dp[i+1][j] %= 1000000007;
//			dp[i+1][j+1] %= 1000000007;
//		}
//		dp[i+1][b.size()] += dp[i][b.size()];
//	}
//
//	cout << dp[t.size()][b.size()]%1000000007 << endl;
//
//	return 0;
/*	int p, m, c;
	cin >> p >> m >> c;

	cout << p + m + c << endl;*/
	/*int ha, hb, ka, kb, a, b, c, d, x, y;
	cin >> ha >> hb >> ka >> kb >> a >>b >>c >>d;

	x = ha*a+hb*b+(ha/10)*c+(hb/20)*d;
	y = ka*a+kb*b+(ka/10)*c+(kb/20)*d;

	if(x > y){
		cout << "hiroshi" << endl;
	}

	else if(y > x){
		cout << "kenjiro" << endl;
	}

	else{
		cout << "even" << endl;
	}*/
	/*
	int D, L;
	cin >> D >> L;

	cout << D/L+D%L << endl;
	*/
	
	int n;
	cin >> n;

	int x[100],y[100],z[100],X,Y,Z,a=0,sol[100][3] = {};

	//A
	cin >> X;
	for(int i=0; i<X; i++){
		int xm;
		cin >> xm;
		sol[xm][0] = 1;
	}

	//B
	cin >> Y;
	for(int i=0; i<Y; i++){
		int ym;
		cin >> ym;
		 sol[ym][1] = 1;
	}

	//C
	cin >> Z;
	for(int i=0; i<Z; i++){
		int zm;
		cin >> zm;
		if(sol[zm][1] == 1)a++;
		else if(sol[zm][0] != 1)a++;
	}

	cout << a << endl;
	
/*
	int n;
	cin >> n;

	int P[100];

	for(int i=0; i<n; i++){
		int p;
		cin >> p;
		P[i] = p;
	}

	int j=0,nol=1;

	while(true){
		for(int i=0; i < n; i++){
			if(P[i] >= nol)j++;
		}
		if(j < nol)break;
		nol++;
		j=0;
	}



	cout << nol-1 << endl;
	*/
	/*
	int c,n;
	cin >> c >> n;

	for(int i=0; i<n; i++){
		string s;
		cin >> s;
		C[i] = s;
	}

	int cor=0,mir=0;

	for(int i=0; i<n/2; i++){
		string J;
		J = C[i];
		for(int j=0; j<n/2; j++){
			if(J[j] == C[0][i][n-j)mir++;
			if(C[0][j][i] == C[0][n-j][i])mir++;
		}
	}

	if(mir == n*n)cor++;

	for(int i=0; i<c-1; i++){

		//repair
		int diff;
		cin >> diff;
		for(int j=0; j<diff; j++){
			int ry,rx;
			cin >> ry >> rx;
			if(C[i][ry][rx] == 0){
				C[i][ry][rx] = 1;
			}
			else C[i][ry][rx] = 0;
		}

		//mirror?
		mir = 0;

		for(int j=0; j<n/2; j++){
			for(int k=0; k<n/2; k++){
				if(C[i+1][j][k] == C[i+1][j][n-k])mir++;
				if(C[i][k][j] == C[i][n-k][j])mir++;
			}
		}
	
		if(mir == n*n)cor++;


	}
	
	cout << cor << endl;
	*/





	return 0;

}

