#include <iostream>

using namespace std;

#define MAX_N 100

int main() {

    int n;
    cin >> n;

    int A[MAX_N], B[MAX_N], C[MAX_N];
    for ( int i=0; i<n; ++i ) A[i] = B[i] = C[i] = 0;

    int x, y, z, e;
    cin >> x;
    for ( int i=0; i<x; ++i ) {
	cin >> e;
	A[e-1] = 1;
    }

    cin >> y;
    for ( int i=0; i<y; ++i ) {
	cin >> e;
	B[e-1] = 1;
    }

    cin >> z;
    for ( int i=0; i<z; ++i ) {
	cin >> e;
	C[e-1] = 1;
    }

    int ans = 0;
    for ( int i=0; i<n; ++i ) {
	if ( (!A[i] && C[i]) || (B[i] && C[i]) ) ++ans;
    }
    cout << ans << endl;

    return 0;
}

