#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100;
int n, x, y, z, a[MAX_N] = {}, b[MAX_N] = {}, c[MAX_N] = {};
bool an[MAX_N] = {}, bn[MAX_N] = {}, cn[MAX_N] = {};
int main() {
  cin >> n;
  cin >> x;
  for (int i = 0; i < x; i++) {
    cin >> a[i];
    an[a[i]] = true;
  }
  cin >> y;
  for (int i = 0; i < y; i++) {
    cin >> b[i];
    bn[b[i]] = true;
  }
  cin >> z;
  for (int i = 0; i < z; i++) {
    cin >> c[i];
    cn[c[i]] = true;
  }
  int s = 0;
  for (int i = 0; i < n; i++) {
    if (cn[i] && !an[i])
      s++;
    else if (cn[i] && bn[i])
      s++;
  }
  cout << s << endl;
  return 0;
}
