#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
    int n,x,y,z,re,count=0;
    bool a[101]={false},b[101]={false},c[101]={false};
    scanf("%d%d",&n,&x);
    for(int i=0;i<x;++i){
        scanf("%d",&re);
        a[re]=true;
    }
    scanf("%d",&y);
    for(int i=0;i<y;++i){
        scanf("%d",&re);
        b[re]=true;
    }
    scanf("%d",&z);
    for(int i=0;i<z;++i){
        scanf("%d",&re);
        c[re]=true;
    }
    for(int i=1;i<=n;++i){
        if((!a[i] && c[i])||(b[i]&&c[i])){
            count++;
        }
    }
    printf("%d\n",count);
    return 0;
}
