#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef std::pair<int,int> pii;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int main(){
    int n; cin>>n;
    int ans=0;
    vector<pair<bool,bool>> v(n,mp(false,false));
    rep(i,0,3){
        int m;cin>>m;
        rep(j,0,m){
            int x;cin>>x;
            if(i==0)v[x-1].fi=true;
            else if(i==1)v[x-1].se=true;
            else {
                if(!v[x-1].fi||v[x-1].se)ans++;
            }
        }
    }
    cout<<ans<<endl;
    
    return 0;
}

