#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;
typedef long long ll;
using namespace std;
const ll mod=1000000007,mod9=1000000009;
template <class T>inline T lcm(T a,T b){return (a*b/__gcd(a,b));}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin>>n;
    ll x,y,z;
    ll a;
   
    vector<set<int> > v(3);
    cin>>x;
    for(int i=0;i<x;i++){
        cin>>a;
        v[0].insert(a);
    }
    cin>>y;
    for(int i=0;i<y;i++){
        cin>>a;
        v[1].insert(a);
    }
    cin>>z;
    for(int i=0;i<z;i++){
        cin>>a;
        v[2].insert(a);
    }
    ll ans=0;
    for(int i=1;i<=n;i++){
        if(((v[0].count(i)==0)&&(v[2].count(i)))||((v[1].count(i))&&(v[2].count(i)))){
            ans++;
        }
    }
    cout << ans<<endl;
    


    return 0;
}


