#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;

int N, X, Y, Z;
std::set<int>ans;

int main()
{
	in >> N;
	in >> X;
	std::vector<int>a(X);
	rep(i, X) in >> a[i];
	in >> Y;
	std::vector<int>b(Y);
	rep(i, Y) in >> b[i];
	in >> Z;
	std::vector<int>c(Z);
	rep(i, Z) in >> c[i];
	rep(i, Z)
	{
		bool flag = true;
		rep(j, X)
		{
			if (c[i] == a[j])
			{
				flag = false;
				break;
			}
		}
		if (flag) ans.insert(c[i]);
	}
	rep(i, Y)
	{
		bool flag = false;
		rep(j, Z)
		{
			if (b[i] == c[j])
			{
				flag = true;
				break;
			}
		}
		if (flag) ans.insert(b[i]);
	}
	out << ans.size() << std::endl;
	return 0;
}

