#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define END << endl;
#define SP << " " << 
using namespace std;

int A[105],B[105],C1[105],C2[105];

int main(){
	REP(i,105){
		A[i]=B[i]=C1[i]=C2[i]=0;
	}
	int n,x,y,z,a,c=0;
	cin>>n;
	cin>>x;
	REP(i,x){
		cin>>a;
		A[a-1]=1;
	}
	cin>>y;
	REP(i,y){
		cin>>a;
		B[a-1]=1;
	
	}
	cin>>z;
	REP(i,z){
		cin>>a;
		C1[a-1]=C2[a-1]=1;
	}
	REP(i,n){
		if(A[i]==1&&C1[i]==1) C1[i]=0;
		if(B[i]==0&&C2[i]==1) C2[i]=0;
	}
	REP(i,n){
		if(C1[i]==1||C2[i]==1) c++;
	}
	cout<<c<<endl;
	return 0;
}
