#include <iostream>
using namespace std;

int main(){
	int n,x[3],p[100] = {},ans = 0;
	cin >> n;
	for(int i = 0;i < 3;i++){
		cin >> x[i];
		for(int j = 0;j < x[i];j++){
			int t;
			cin >> t; t--;
			p[t] += 1;
		}
		if(i != 2) for(int j = 0;j < n;j++) p[j] *= 2;
	}
	for(int i = 0;i < n;i++){
		if(p[i] == 7 || p[i] == 3 || p[i] == 1) ans++;
	}
	cout << ans << endl;
	return 0;
}