#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>0;--i)
#define yesno(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define Vi vector<int>
#define Vl vector<long long>
#define pb(a) push_back(a)
using namespace std;

typedef long long ll;
const int inf=1000000000;
const int np=1000000007;
struct edge{
	int myc,to,c,cost;
};
struct pos{
	int to,cost,color;
};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main() {
	int n,x,y,z;
	int a[101]={};
	int b[101]={};
	int c[101]={};
	int a1,b1,c1;

	cin>>n;
	cin>>x;
	rep(i,x){
		cin>>a1;
		a[a1]=1;
	}
	cin>>y;
	rep(i,y){
		cin>>b1;
		b[b1]=1;
	}
	cin>>z;
	rep(i,z){
		cin>>c1;
		c[c1]=1;
	}
	int total=0;
	for(int i=1;i<n+1;++i){
		if(c[i]>0&&(b[i]>0||a[i]==0))total++;
	}
	cout<<total<<endl;
	return 0;
}

