#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    
    vector<int> a(n);
    vector<int> b(n);
    vector<int> c(n);
    
    int tmp;
    int n2;
    cin >> n2;
    for( int i = 0; i < n2; i++ ){
        int tmp;
        cin >> tmp;
        a[tmp - 1] = 1;
    }
    
    cin >> n2;
    for( int i = 0; i < n2; i++ ){
        int tmp;
        cin >> tmp;
        b[tmp - 1] = 1;
    }
    
    cin >> n2;
    for( int i = 0; i < n2; i++ ){
        int tmp;
        cin >> tmp;
        c[tmp - 1] = 1;
    }
    
    int count = 0;
    for( int i = 0; i < n; i++ ){
        if( ( !a[i] && c[i] ) || ( b[i] && c[i] )){
            count++;
        }
    }
    
    cout << count << endl;
}
