#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<math.h>
#include<queue>

using namespace std;


//極秘調査

int main() {
	int N, X, Y, Z;
	bool A[100], B[100], C[100];
	cin >> N;
	for (int i = 0; i < N; i++) {
		A[i] = false;
		B[i] = false;
		C[i] = false;
	}
	
	cin >> X;
	for (int i = 0; i < X; i++) {
		int tmp;
		cin >> tmp;
		A[tmp-1] = true;
	}

	cin >> Y;
	for (int i = 0; i < Y; i++) {
		int tmp;
		cin >> tmp;
		B[tmp-1] = true;
	}

	cin >> Z;
	for (int i = 0; i < Z; i++) {
		int tmp;
		cin >> tmp;
		C[tmp-1] = true;
	}

	int ans = 0;
	for (int i = 0; i < N; i++) {
		if (A[i] == false && B[i] == false && C[i] == true)
			ans++;
		if (B[i] == true && C[i] == true)
			ans++;
	}

	cout << ans << endl;

	return 0;
}

