#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
typedef long long int ll;
#define BIG_NUM 2000000000
#define MOD 1000000007
using namespace std;

struct Info{
	Info(){
		is_A = false;
		is_B = false;
	}
	bool is_A,is_B;
};

int main(){

	int N,num,ans = 0,tmp;
	scanf("%d",&N);

	Info info[N+1];

	scanf("%d",&num);

	for(int i = 0; i < num; i++){
		scanf("%d",&tmp);
		info[tmp].is_A = true;
	}

	scanf("%d",&num);

	for(int i = 0; i < num; i++){
		scanf("%d",&tmp);
		info[tmp].is_B = true;
	}

	scanf("%d",&num);

	for(int i = 0; i < num; i++){
		scanf("%d",&tmp);
		if(info[tmp].is_A == false || info[tmp].is_B == true)ans++;
	}

	printf("%d\n",ans);

	return 0;
}