#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9;
const int MOD = INF+7;
const ll LINF = 1e18;
#define rep(i,N) for(int (i)=0;(i)<(N);++(i))
#define rrep(i,N) for(int (i)=(N-1);(i)>0;--i)
#define FOR(i,j,N) for(int (i)=(j);(i)<(N);++(i))
#define put(n) cout<<(n)<<endl;
#define VI vector<int>
#define VII vector<vector<int>>
#define all(v) (v.begin(),v.end())
#define MP make_pair
#define pb(n) push_back(n)


int main(){
    int N;cin>>N;
    vector<int> p(N+1,2);
    int X,A,ans=0;
    rep(i,3){
        cin>>X;
        rep(j,X){
            cin>>A;
            if(i==0)++p[A];
            if(i==1)p[A]-=2;
            if(i==2&&p[A]<3) ++ans;
        }
    }
    put(ans);
}
