#include<bits/stdc++.h>
using namespace std;
 
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

typedef long long ll;
typedef pair<int, int> ii;
 
int main(){

	int n;
	cin >> n;
	vector<vector<bool>> f(3, vector<bool>(100));
	int x, y, z;
	cin >> x;
	rep(i, x){
		int tmp;
		cin >> tmp;
		f[0][tmp] = true;
	}
	cin >> y;
	rep(i, y){
		int tmp;
		cin >> tmp;
		f[1][tmp] = true;
	}
	cin >> z;
	rep(i, z){
		int tmp;
		cin >> tmp;
		f[2][tmp] = true;
	}
	
	int ans = 0;
	rep(i, 101){
		if((!f[0][i] && f[2][i]) || (f[1][i] && f[2][i])) ans++;
	}
	
	cout << ans << endl;

}