#include <iostream>
using namespace std;
int main(void){
    
    int a,b,c,d,e,count;
    int h1[101]={};
    int h2[101]={};
    int h3[101]={};
    count=0;
    cin>>a>>b;
    for(int i=0;i<b;i++){
        cin>>c;
        h1[c-1]=1;
    }
    cin>>d;
    for(int y=0;y<d; y++){
        cin>>c;
        h2[c-1]=1;
    }
    cin>>e;
    for(int u=0;u<e;u++){
        cin>>c;
        h3[c-1]=1;
    }
    for(int o=0;o<a;o++){
        if(h1[o]==0&&h2[o]==1&&h3[o]==1){
            count++;
        }else if(h1[o]==0&&h3[o]==1){
            count++;
        }else if(h2[o]==1&&h3[o]==1){
            count++;
        }
    }
    cout<<count<<endl;
}

