#include <iostream>
using namespace std;
#define MAX 100
int main(void){
    // Your code here!
    int n;
    cin >> n;
    int a;
    cin >> a;
    int A[MAX];
    for(int i = 0; i < a; i++)cin >> A[i];
    
    int b;
    cin >> b;
    int B[MAX];
    for(int i = 0; i < b; i++)cin >> B[i];
    
    int c;
    cin >> c;
    int C[MAX];
    for(int i = 0; i < c; i++)cin >> C[i];
    
    for(int i = 0; i < b; i++){
        for(int j = 0; j < c; j++){
            if(B[i] == C[j]) C[j] = -1;
        }
    }
    
    for(int i = 0; i < a; i++){
        for(int j = 0; j < c; j++){
            if(A[i] == C[j] && C[j]!= -1) C[j] = -2;
        }
    }
    int count = 0;
    for(int i = 0; i < c; i++){
        if(C[i] >= -1) count++;
    }
    cout << count << endl;
}

