#include <bits/stdc++.h>
using namespace std;
const int lim = 1000006;
//適当に被らなそうな値
const int ok = 100;

int a[lim];
int b[lim];
int ans = 0;

int main(){
	int n;
	cin >> n;
	
	int x; cin >> x;
	for(int i=0; i<x; i++){
		int id; cin >> id;
		a[id] = 1;
	}
	
	int y; cin >> y;
	for(int i=0; i<y; i++){
		int id; cin >> id;
		b[id] = 1;
	}
	
	int z; cin >> z;
	for(int i=0; i<z; i++){
		int id; cin >> id;
		if(!a[id] || b[id]) ans++;
	}

	cout << ans << endl;
	
	
	return 0;
}
