#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  int guard = 101;
  int count = 0;
  int x, y, z;
  cin >> x;
  int X[x];
  for (int i = 0; i < x; i++) {
    cin >> X[i];
  }
  cin >> y;
  int Y[y];
  for (int i = 0; i < y; i++) {
    cin >> Y[i];
  }
  cin >> z;
  int Z[z];
  for (int i = 0; i < z; i++) {
    cin >> Z[i];
  }
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < z; j++) {
      if (X[i] == Z[j]) {
        Z[j] = guard;
      }
    }
  }
  for (int i = 0; i < y; i++) {
    for (int j = 0; j < z; j++) {
      if (Y[i] == Z[j]) {
        count++;
        Z[j] = guard;
      }
    }
  }
  for (int i = 0; i < z; i++) {
    if (Z[i] != guard) {
      count++;
    }
  }
  cout << count << endl;
}
