#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z;
  cin >> n;
  bool ta[n], tb[n], tc[n];
  cin >> x;
  int a[x];
  for (int i = 0; i < x; i++) {
    cin >> a[i];
    ta[a[i]] = true;
  }
  cin >> y;
  int b[y];
  for (int i = 0; i < y; i++) {
    cin >> b[i];
    tb[b[i]] = true;
  }
  cin >> z;
  int c[z];
  for (int i = 0; i < z; i++) {
    cin >> c[i];
    tc[c[i]] = true;
  }
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (((ta[i] != true) && (tc[i] == true)) ||
        ((tb[i] == true) && (tc[i] == true)))
      count++;
  }
  cout << count << endl;
  return 0;
}
