#include <bits/stdc++.h>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef long long ll;
typedef pair<int, int> pii;

const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const bool debug = 0;

int N, X, Y, Z;
bool f[3][100];

int main() {
	cin >> N;
	cin >> X;
	REP(i, X) {
		int a;
		scanf("%d", &a);
		f[0][a - 1] = true;
	}
	
	cin >> Y;
	REP(i, Y) {
		int b;
		scanf("%d", &b);
		f[1][b - 1] = true;
	}
	
	cin >> Z;
	REP(i, Z) {
		int c;
		scanf("%d", &c);
		f[2][c - 1] = true;
	}
	
	int ans = 0;
	REP(i, N) {
		if ((!f[0][i] && f[2][i]) || (f[1][i] && f[2][i])) ans++;
	}
	cout << ans << endl;
	
	return 0;
}