#include <iostream>

using namespace std;

int main()
{
    int N;
    cin>>N;
    bool A[101] = {}, B[101] = {}, C[101] = {};
    int X;
    cin>>X;
    for (int i=0; i<X; i++)
    {
        int a;
        cin>>a;
        A[a] = true;
    }
    int Y;
    cin>>Y;
    for (int i=0; i<Y; i++)
    {
        int b;
        cin>>b;
        B[b] = true;
    }
    int Z;
    cin>>Z;
    for (int i=0; i<Z; i++)
    {
        int c;
        cin>>c;
        C[c] = true;
    }
    int ans = 0;
    for (int i=1; i<=N; i++)
        if (!A[i] && C[i] || B[i] && C[i])
            ans++;
    cout<<ans<<endl;
}