#include <bits/stdc++.h>

using namespace std;
using LL = long long;
int Xx[1000];
int Yy[1000];
int Zz[1000];
int main()
{
    int N;cin >> N;
    int X;cin >> X;
    for(int a = 0;a < X;a++){
        int s;cin >> s;
        Xx[s]=1;
    }
    int Y;cin >> Y;
    for(int a = 0;a < Y;a++){
        int s;cin >> s;
        Yy[s]=1;
    }
    int Z;cin >> Z;
    for(int a = 0;a < Z;a++){
        int s;cin >> s;
        Zz[s]=1;
    }
    int ans = 0;
    for(int a = 1;a <= N;a++){
        if(Zz[a] == 1 && (Xx[a] != 1 || Yy[a] == 1)){
            ans++;
        }
    }
    cout<<ans<<endl;
    return 0;
}

