#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, X, Y, Z, ans = 0;
  vector<int> a, b, c;
  cin >> N;
  cin >> X;
  a.resize(X);
  for (int i = 0; i < a.size(); ++i) {
    cin >> a[i];
  }
  cin >> Y;
  b.resize(Y);
  for (int i = 0; i < b.size(); ++i) {
    cin >> b[i];
  }
  cin >> Z;
  c.resize(Z);
  for (int i = 0; i < c.size(); ++i) {
    cin >> c[i];
  }
  int work;
  for (int i = 0; i < N; ++i) {
    work = false;
    for (int t = 0; t < c.size(); ++t) {
      if (i == c[t]) {
        work = true;
        break;
      }
    }
    if (work) {
      work = false;
      for (int t = 0; t < b.size(); ++t) {
        if (i == b[t]) {
          work = true;
          ++ans;
          break;
        }
      }
      if (!work) {
        work = false;
        for (int t = 0; t < a.size(); ++t) {
          if (i == a[t]) {
            work = true;
            break;
          }
        }
        if (!work) ++ans;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
