#include <bits/stdc++.h>
#include <assert.h>

using namespace std;

int main()
{
	int n, x, y, z;
	map<int, bool> ga, gb, gc;
	cin >> n;
	cin >> x;
	for (int i = 0; i < x; i++)
	{
		int a;
		cin >> a;
		ga[a] = true;
	}
	cin >> y;
	for (int i = 0; i < y; i++)
	{
		int b;
		cin >> b;
		gb[b] = true;
	}
	cin >> z;
	for (int i = 0; i < z; i++)
	{
		int c;
		cin >> c;
		gc[c] = true;
	}
	int ans = 0;
	for (int i = 1; i <= n; i++)
		if ((!ga[i] && gc[i]) || (gb[i] && gc[i]))
			ans++;
	cout << ans << endl;

	return 0;
}

