#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, x, y, z;
  bool a[100] = {}, b[100] = {}, c[100] = {};
  cin >> n;
  cin >> x;
  for (int i = 0; i < x; ++i) {
    int t;
    cin >> t;
    a[t - 1] = true;
  }
  cin >> y;
  for (int i = 0; i < y; ++i) {
    int t;
    cin >> t;
    b[t - 1] = true;
  }
  cin >> z;
  for (int i = 0; i < z; ++i) {
    int t;
    cin >> t;
    c[t - 1]= true;
  }

  int res[100];
  for (int i = 0; i < 100; ++i) {
    res[i] = (!a[i] & c[i]) | (b[i] & c[i]);
  }
  cout << std::count(begin(res), end(res), true) << endl;
}