#include<iostream>
using namespace std;
int main() {
	int n, aa, bb, cc,aaa, a[111], b[111], ans,c[111];
	cin >> n;
	cin >> aa;
	for (int i = 1; i <= n; i++) {
		a[i] = 0;
		b[i] = 0;
		c[i] = 0;
	}
	for (int i = 1; i <= aa; i++) {
		cin >> aaa;
		a[aaa] = 1;
	}
	cin >> bb;
	for (int i = 1; i <= bb; i++) {
		cin >> aaa;
		b[aaa] = 1;
	}
	cin >> cc;
	for (int i = 1; i <= cc; i++) {
		cin >> aaa;
		c[aaa] = 1;
	}
	ans = 0;
	for (int i = 1; i <= n; i++) {
		if (c[i] == 1 && b[i] == 1 || c[i] == 1 && a[i] == 0) {
			ans++;
		}
	}
	cout << ans << endl;
}
