#include <bits/stdc++.h>
using namespace std;
struct person {
  bool a = false;
  bool b = false;
  bool c = false;
};
int main() {
  int n, x, y, z;
  int num = 0;
  cin >> n >> x;
  person per[n + 1];
  int xper[101];
  for (int i = 1; i <= x; i++) {
    cin >> xper[i];
  }
  cin >> y;
  int yper[101];
  for (int i = 1; i <= y; i++) {
    cin >> yper[i];
  }
  cin >> z;
  int zper[101];
  for (int i = 1; i <= z; i++) {
    cin >> zper[i];
  }
  for (int i = 1; i <= x; i++) {
    per[xper[i]].a = true;
  }
  for (int i = 1; i <= y; i++) {
    per[yper[i]].b = true;
  }
  for (int i = 1; i <= z; i++) {
    per[zper[i]].b = true;
  }
  for (int i = 1; i <= n; i++) {
    if ((per[i].c == true) && (per[i].b == false) && (per[i].a == true)) num++;
  }
  cout << z - num << endl;
  return 0;
}
