#include <bits/stdc++.h>

typedef long long ll;
#define ALL(a) a, a+sizeof(a)/sizeof(a[0])
#define all(a) a.begin(),a.end()
#define MOD 1000000007
using namespace std;
ll gcd(ll n, ll m) {
	if (m == 0) return n;
	return gcd(m, n % m);
}
ll lcm(ll n, ll m) {return m / gcd(n, m) * n;}

int main(void) {
	ll n,x,y,z,ans=0;
	cin >> n;
	vector<ll> a(n), b(n), c(n);
	cin >> x;
	for (ll j = 0; j<x; j++) {
		cin >> a[j];
	}
	cin >> y;
	for (ll j = 0; j < y; j++) {
		cin >> b[j];
	}
	cin >> z;
	for (ll j = 0; j < z; j++) {
		cin >> c[j];
	}
	for (int ci = 0; ci < z; ci++) {
		bool flg1 = false;
		bool flg2 = true;
		for (int bi = 0; bi < y; bi++) {
			if (c[ci] == b[bi]) {
				flg1=true;
			}
		}
		for (int ai = 0; ai < x; ai++) {
			if (c[ci] == a[ai])
				flg2 = false;
		}
		if (flg1 || flg2) ans++;
	}
	cout << ans << endl;
	return 0;
}
