#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <numeric>
#include <bitset>
#include <vector>
#include <queue>

using namespace std;

typedef long long ll;
#define FOR(i,a,b) for (ll i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
typedef pair<ll,ll> cp2;
typedef pair<ll,cp2> cp3;
#define fi first
#define se second
#define sec se.fi
#define thr se.se
const ll mod = 1000000007;
//              123456789

int p[105];

int main(){
	int n, x, y, z;
	
	cin >> n;
	
	cin >> x;
	
	REP(i,x){
		int a;
		
		cin >> a;
		
		p[a]--;
	}
	
	cin >> y;
	
	REP(i,y){
		int b;
		
		cin >> b;
		
		p[b]++;
	}
	
	cin >> z;
	
	REP(i,z){
		int c;
		
		cin >> c;
		
		p[c] += 2;
	}
	
	int cnt = 0;
	
	REP(i,n+1){
		if (p[i] >= 2) cnt++;
	}
	
	cout << cnt << endl;
	
	return 0;
}