#include<iostream>
using namespace std;
int main(){
	int n, ans = 0; cin >> n;
	int a[101], b[101];
	for (int i = 1; i <= n; i++){
		a[i] = false;
		b[i] = false;
	}
	int x; cin >> x;
	for (int i = 0; i < x; i++){
		int k; cin >> k; a[k] = true;
	}
	int y; cin >> y;
	for (int i = 0; i < y; i++){
		int k; cin >> k; b[k] = true;
	}
	int z; cin >> z;
	for (int i = 0; i < z; i++){
		int k; cin >> k;
		if (!a[k] || b[k])ans++;
	}
	cout << ans << endl;
}