#include <iostream>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

int n;
int x, a;
bool flag[3][100];

int main() {
	int i;
	
	cin >> n;
	cin >> x; rep(i, x) { cin >> a; flag[0][a-1] = true; }
	cin >> x; rep(i, x) { cin >> a; flag[1][a-1] = true; }
	cin >> x; rep(i, x) { cin >> a; flag[2][a-1] = true; }
	int ans = 0;
	rep(i, n) {
		if ((!flag[0][i] && flag[2][i]) || (flag[1][i] && flag[2][i])) {
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}
