#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define mod 1000000007
#define MOD 998244353
#define INF 40000000000000000
int dx8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int dy8[8] = {1, 1, 1, 0, -1, -1, -1, 0};
int dx4[4] = {-1, 0, 1, 0};
int dy4[4] = {0, -1, 0, 1};
template <class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
signed main(){
    int N;cin>>N;
    vector<int>V(N,0);
    int X;cin>>X;
    rep(i,X){
        int j;cin>>j;
        V[j-1]+=1;
    }
    int Y;cin>>Y;
    rep(i,Y){
        int j;cin>>j;
        V[j-1]+=2;
    }
    int Z;cin>>Z;
    rep(i,Z){
        int j;cin>>j;
        V[j-1]+=4;
    }
    int ans=0;
    rep(i,N){
        if(V[i]==7||V[i]==6||V[i]==4)ans++;
    }
    cout<<ans<<endl;
}


