#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;

int main() {
  int n, x, y, z;
  cin >> n;
  vector<int> t(n + 10, 0); // a == true += 1; b == true += 2; c == true += 4;
  cin >> x;
  vector<int> a(x);
  int i;
  for (i = 0; i < x; i++) {
    cin >> a[i];
    t[a[i]] += 1;
  }
  cin >> y;
  vector<int> b(y);
  for (i = 0; i < y; i++) {
    cin >> b[i];
    t[b[i]] += 2;
  }
  cin >> z;
  vector<int> c(z);
  for (i = 0; i < z; i++) {
    cin >> c[i];
    t[c[i]] += 4;
  }
  int result = 0;
  for (i = 0; i < t.size(); i++) {
    if (t[i] == 7 || t[i] == 6 || t[i] == 4) {
      result++;
    }
  }
  cout << result << endl;
  return 0;
}

