#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

int main() {
	
	int n,x,y,z,in;
	cin >> n;
	bool a[105],b[105],c[105];
	for (int i = 0;i <= n;i++){
		a[i] = false;
		b[i] = false;
		c[i] = false;
	}

	cin >> x;
	for (int i = 0;i < x;i++){
		cin >> in;
		a[in] = true;
	}	
	cin >> y;
	for (int i = 0;i < y;i++){
		cin >> in;
		b[in] = true;
	}
	cin >> z;
	for (int i = 0;i < z;i++){
		cin >> in;
		c[in] = true;
	}

	int ans = 0;

	for (int i = 1;i <= n;i++){
		if((!a[i] && c[i]) || (b[i] && c[i])) ans++;
	}

	printf("%d\n",ans);

	return 0;

}

