#include<iostream>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
int main(){
    int n, count1=0, count2=0;
    int a[101],b[101], c[101];
    lp(i,101){
        a[i]=0;
        b[i]=0;
        c[i]=0;
    }
    cin>>n;
    int x;
    cin>>x;
    lp(i,x){
        int c;
        cin>>c;
        a[c]++;
    }
    int y;
    cin>>y;
    lp(i,y){
        int c;
        cin>>c;
        b[c]++;
    }
    int z;
    cin>>z;
    lp(i,z){
        int d;
        cin>>d;
        c[d]++;
    }
    lp(i,101){
        if(b[i] + c[i] == 2) count1++;
    }
    lp(i,101){
        if(c[i] - b[i] - a[i] == 1) count2++;
    }
    cout<<count1 + count2<<endl;
    return 0;
}

