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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

int main()
{
    int m;
    int temp;
    cin >> m;
    m++;
    vector<int> a(m);
    vector<int> b(m);
    vector<int> c(m);
    int n;
    cin >> n;
    rep(i, n)
    {
        cin >> temp;
        a[temp] = 1;
    }
    cin >> n;
    rep(i, n)
    {
        cin >> temp;
        b[temp] = 1;
    }
    cin >> n;
    rep(i, n)
    {
        cin >> temp;
        c[temp] = 1;
    }
    int ans = 0;
    rep(i, m)
    {
        if ((a[i] == 0 || b[i] == 1) && c[i] == 1)
            ans++;
    }
    cout<<ans<<endl;
}