#include<iostream>
using namespace std;

int main()
{
    int n, m, e, a[101] = {0}, b[101] = {0}, c[101] = {0}, d[101] = {0};

    cin >> n;

    cin >> m;
    for( int i = 0; i < m; i++ )
    {
        cin >> e;
        a[e]++;
    }

    cin >> m;
    for( int i = 0; i < m; i++ )
    {
        cin >> e;
        b[e]++;
    }

    cin >> m;
    for( int i = 0; i < m; i++ )
    {
        cin >> e;
        c[e]++;
    }

    for( int i = 1; i <= n; i++ )
        if( a[i] == 0 && c[i] >= 1 || b[i] >= 1 && c[i] >= 1 )
            d[i]++;

    int cnt = 0;
    for( int i = 1; i <= n; i++ )
        if( d[i] >= 1 )
            cnt++;
    
    cout << cnt << endl;

    return 0;
}
