#include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
#include<map>
#include<vector>
#define int long long
using namespace std;
int aa[123], bb[123], cc[123];
signed main() {
	int n, a, b, c, d, e, f, ans = 0; cin >> n;
	cin >> a;
	for (int h = 0; h < a; h++) {
		cin >> d; aa[d] = 1;
	}
	cin >> b;
	for (int h = 0; h < b; h++) {
		cin >> e; bb[e] = 1;
	}
	cin >> c;
	for (int h = 0; h < c; h++) {
		cin >> f; cc[f] = 1;
	}
	for (int h = 0; h <= n; h++) {
		if (cc[h] == 1) {
			if (bb[h] == 1) {
				ans++;
			}
			if (aa[h] == 0 && bb[h] == 0) {
				ans++;
			}
		}
	}
	cout << ans << endl;
}
