#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<functional>
#include<vector>
#include<queue>
#include<stack>
#include<set>
using namespace std;
#define MOD 1000000007
#define f(i,n) for(int i=0;i<int(n);i++)
#define N 200000
int main(){
	bool a[N];
	int n, m, x, s;
	scanf("%d", &n);
	f(i, n)a[i] = true;
	scanf("%d", &m);
	f(i, m){
		scanf("%d", &x);
		a[x - 1] = false;
	}
	scanf("%d", &m);
	f(i, m){
		scanf("%d", &x);
		a[x - 1] = true;
	}
	s = 0;
	scanf("%d", &m);
	f(i, m){
		scanf("%d", &x);
		if (a[x - 1])s++;
	}

	printf("%d\n", s);
	return 0;
}
