#include <bits/stdc++.h>

using namespace std;

#define int long long 
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int, P> Pi;
typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[] = { 0, 0, 1, -1 };
const int dx[] = { 1, -1, 0, 0 };

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

int X[101], Y[101];

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N, x, y;
    cin >> N;
    cin >> x;
    for(int i = 0; i < x; ++i) {
        int a;
        cin >> a;
        X[a] = 1;
    }
    cin >> y;
    for(int i = 0; i < y; ++i) {
        int a;
        cin >> a;
        Y[a] = 1;
    }
    int z;
    cin >> z;
    int res = 0;
    for(int i = 0; i < z; ++i) {
        int a;
        cin >> a;
        if(!X[a] || Y[a]) ++res;
    }
    cout << res << endl;
    return 0;
}

