#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;
	vector<int>v;
	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]) {
				v.push_back(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) {
			bool flag = false;
			for (int j = 0; j < v.size(); ++j) {
				if (v[j] == z[i]) flag = true;
			}
			if (!flag) v.push_back(x[i]);
		}
	}
	cout << v.size() << endl;
}
