#include <iostream>
using namespace std;
const int N=110;
bool x[N],y[N],z[N];
int main() {
	// your code goes here
	int n,X,Y,Z;
	cin>>n;
	cin>>X;
	for(int i=0;i<X;i++){
		int a;
		cin>>a;
		x[a]=1;
	}
	cin>>Y;
	for(int i=0;i<Y;i++){
		int b;
		cin>>b;
		y[b]=1;
	}
	cin>>Z;
	for(int i=0;i<Z;i++){
		int c;
		cin>>c;
		z[c]=1;
	}
	int ans=0;
	for(int i=1;i<=n;i++){
		if(!x[i]&&!y[i]&&z[i] || y[i]&&z[i]) ans++;
	}
	cout<<ans<<endl;
}