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

int main() {
  int N, X, Y, Z;
  cin >> N >> X;
  vector<int> a(X);
  for (int i = 0; i < X; ++i)
    cin >> a[i];
  cin >> Y;
  vector<int> b(Y);
  for (int i = 0; i < Y; ++i)
    cin >> b[i];
  cin >> Z;
  vector<int> c(Z);
  for (int i = 0; i < Z; ++i)
    cin >> c[i];

  vector<bool> aa(N + 1), bb(N + 1), cc(N + 1);
  for (int i = 0; i < X; ++i)
    aa[a[i]] = true;
  for (int i = 0; i < Y; ++i)
    bb[b[i]] = true;
  for (int i = 0; i < Z; ++i)
    cc[c[i]] = true;

  int ans = 0;
  for (int i = 1; i <= N; ++i)
    if ((!aa[i] && cc[i]) || (bb[i] && cc[i]))
      ++ans;

  cout << ans << endl;
}
