#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <cstdio>
using namespace std;
#define F first
#define S second
typedef long long ll;
typedef pair<ll,ll> P;
int n,x,ans;
bool a[105],b[105],c[105];
int main(void){
    cin>>n>>x;
    for(int i=0;i<x;i++){
        int y;
        cin>>y;
        a[--y]=true;
    }
    cin>>x;
    for(int i=0;i<x;i++){
        int y;
        cin>>y;
        b[--y]=true;
    }
    cin>>x;
    for(int i=0;i<x;i++){
        int y;
        cin>>y;
        c[--y]=true;
    }
    for(int i=0;i<n;i++){
        if((!a[i]&&c[i])||(b[i]&&c[i]))ans++;
    }
    cout<<ans<<endl;
}
