#include <cstdio>
#include <set>

using namespace std;

int main()
{
    set< int > st;
    int n, a[100], b[100], c[100];
    int x, y, z = 0;
    scanf( "%d\n", &n );
    scanf( "%d\n", &x );
    for( int i = 0; i < x; i++ )
    {
        scanf( "%d ", &a[i] );
    }
    scanf( "%d\n", &y );
    for( int i = 0; i < y; i++ )
    {
        scanf( "%d ", &b[i] );
    }
    scanf( "%d\n", &z );
    for( int i = 0; i < z; i++ )
    {
        scanf( "%d ", &c[i] );
    }
    for( int i = 0; i < z; i++ )
    {
        bool a_include = 0;
        for( int j = 0; j < x; j++ )
        {
            if( c[i] == a[j] )
            {
                a_include = 1;
            }
        }
        if( a_include )continue;
        st.insert( c[i] );
    }
    for( int i = 0; i < z; i++ )
    {
        bool intersection = 0;
        for( int j = 0; j < y; j++ )
        {
            if( c[i] == b[j] )
            {
                intersection = 1;
            }
        }
        if( intersection )
        {
            st.insert( c[i] );
        }
    }
    printf( "%d\n", st.size() );
    return 0;
}
