#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
	int n,a,b,c;
	cin >> n;
	int A[n],B[n],C[n];
	cin >> a;
	
	for(int i = 0;i<a;i++){
		cin>>A[i];
	}

	cin >> b;
	for(int i = 0;i<b;i++){
		cin>>B[i];
	}

	cin >> c;
	for(int i = 0;i<c;i++){
		cin>>C[i];
	}

	int count = c;

	for(int i = 0;i<a;i++){
		for(int j = 0;j<b;j++){
			if(A[i]==B[j]){
				A[i]=n+1;
			}
		}
	}

	for(int i = 0;i<c;i++){
		for(int j = 0;j<a;j++){
			if(A[j]==C[i]){
				count--;
			}
		}
	}

	cout << count << endl;

	return 0;
}
