#include "bits/stdc++.h"
using namespace std;
int main() {
	int n, a, b, c, x[105], y[105], z[105], count = 0, vc = 0;
	cin >> n >> a;
	set<int>ans;
	for (int i = 0; i < a; ++i) {
		cin >> x[i];
	}
	cin >> b;
	for (int i = 0; i < b; ++i) {
		cin >> y[i];
	}
	cin >> c;
	for (int i = 0; i < c; ++i) {
		cin >> z[i];
	}
	for (int i = 0; i < c; ++i) {
		for (int j = 0; j < b; ++j) {
			if (z[i] == y[j]) {
				ans.insert(z[i]);
				vc++;
				break;
				// vc == v.size()
			}
		}
	}
	for (int i = 0; i < c; ++i) {
		bool aa = true;
		for (int j = 0; j < a; ++j) {
			if (z[i] == x[j]) {
				aa = false;
				break;
			}
		}
		if (aa) {
			ans.insert(z[i]);
		}
	}
	cout << ans.size() << endl;
}
