#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int,int>
#define VE vector<int>
#define VP vector<PA>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
const int INF=1e9+7;
const int mod=1e9+7;
struct poi{
	int X;int Y;int Z;
  bool operator<(const poi&R)const{
		return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
	}
};
//
//ACACACACACACACACACACACAC//
//WAWAWAWAWAWAWAWAWAWAWAWA//
//CECECECECECECECECECECECE//
//RERERERERERERERERERERERE//
//TLETLETLETLETLETLETLETLE//
//
int main(){
  int N;
	int X,Y,Z;
	set<int> A,B;
	cin>>N;
	cin>>X;
	FOR(i,0,X){
		int a;
		cin>>a;
		A.insert(a);
	}
	cin>>Y;
	FOR(i,0,Y){
		int b;
		cin>>b;
		B.insert(b);
	}
	set<int> S;
	cin>>Z;
	FOR(i,0,Z){
		int C;
		cin>>C;
		if(A.find(C)==A.end()){
			S.insert(C);
		}
		if(B.find(C)!=B.end()){
			S.insert(C);
		}
	}
	cout<<(int)S.size()<<endl;
	return 0;
}

