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