#include<iostream>
using namespace std;
int main(){
	int N;
	cin>>N;
	bool **box;
	box=new bool*[3];
	for(int i=0;i<3;++i){
		box[i]=new bool[N+1];
		for(int j=1;j<=N;++j){
			box[i][j]=false;
		}
		int n;
		cin>>n;
		for(int j=0;j<n;++j){
			int place;
			cin>>place;
			box[i][place]=true;
		}
	}
	int ans=0;
	for(int i=1;i<=N;++i){
		if(((!box[0][i])&&box[2][i])||(box[1][i]&&box[2][i])){
			++ans;
		}
	}
	cout<<ans<<endl;
	return 0;
}