#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <iomanip>
#include <stdio.h>

using namespace std;

//typedefリスト
typedef vector<long long int> vint;
typedef vector<vector<long long int>> vvint;
typedef vector<string> vstr;
typedef long long int llint;

llint gcd(llint x, llint y) {
	while (y != 0) {
		if (x > y) {
			llint r = x % y;
			x = y;
			y = r;
		}
		else {
			llint r = y % x;
			y = r;
		}
	}
	return x;
}

int main(void) {
	int N, X, Y, Z, ans = 0, bjur = 0, cjur = 0;
	cin >> N >> X;
	vint a(X);
	for (int i = 0; i < X; i++)cin >> a[i];
	cin >> Y;
	vint b(Y);
	for (int i = 0; i < Y; i++)cin >> b[i];
	cin >> Z;
	vint c(Z);
	for (int i = 0; i < Z; i++)cin >> c[i];

	for (int i = 0; i < Z; i++) {
		bjur = 0;
		cjur = 0;
		for (int j = 0; j < Y; j++) {
			if (c[i] == b[j])bjur = 1;
		}
		
		for (int j = 0; j < X; j++) {
			if (a[j] == c[i])cjur = 1;
		}
		if (bjur == 1 || cjur == 0)ans++;
	}
cout<<ans<<endl;
	

}

