#include <bits/stdc++.h>

using namespace std;

int main()
{
  int N;
  cin >> N;

  int X, Y, Z;
  map<int, bool> mp1, mp2;
  cin >> X;
  for ( int i = 0; i < X; i++ ) {
    int a;
    cin >> a;
    mp1[a] = true;
  }

  cin >> Y;
  for ( int i = 0; i < Y; i++ ) {
    int a;
    cin >> a;
    mp2[a] = true;
  }

  cin >> Z;
  int ans = 0;
  for ( int i = 0; i < Z; i++ ) {
    int a;
    cin >> a;
    if ( !mp1[a] || mp2[a] ) ans++;
  }

  cout << ans << endl;
}