#include "bits/stdc++.h"

using namespace std;
using ll = long long;
using ull = unsigned long long;

typedef pair<int, int>pi;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
typedef pair<P, P> PPP;

const ll MOD = 1e9 + 7;
const ll INF = 9e18;
const double DINF = 5e14;
const double eps = 1e-10;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };

#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define pb push_back
#define eb emplace_back
#define fr first
#define sc second

int n, x, y, z, a, ans;
map<int, pair<bool, pair<bool, bool>>>mp;


int main() {
	cin >> n >> x;
	for (int i = 0;i < x;i++) {
		cin >> a;
		mp[a].fr = 1;
	}
	cin >> y;
	for (int i = 0;i < y;i++) {
		cin >> a;
		mp[a].sc.fr = 1;
	}
	cin >> z;
	for (int i = 0;i < z;i++){
		cin >> a;
		mp[a].sc.sc = 1;
	}
	for (auto u : mp) {
		if ((!u.sc.fr&&u.sc.sc.sc) || (u.sc.sc.fr&&u.sc.sc.sc))ans++;
	}
	cout << ans << endl;
	return 0;
}
