#include <iostream>
#include <vector>

using namespace std;

int main() {
    int n;
    cin >> n;

    int x;
    cin >> x;
    vector<int> a(x);
    for (int i = 0; i < x; i++)cin >> a[i];
    int y;
    cin >> y;
    vector<int> b(y);
    for (int i = 0; i < y; i++)cin >> b[i];
    int z;
    cin >> z;
    vector<int> c(z);
    for (int i = 0; i < z; i++)cin >> c[i];

    int ret = 0;
    for (auto member:c) {
        bool nota = true;
        for (auto amem:a)
            if (member == amem)nota = false;
        bool foundb = false;
        for (auto bmem:b)
            if (member == bmem)foundb = true;

        if (nota || foundb)ret++;
    }
    cout << ret << endl;
    return 0;
}
