#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const double pi = acos(-1);
const double eps = 1e-10;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};
int main() {
  int n;
  cin >> n;
  int X, Y, Z;
  vector<int> x(X), y(Y), z(Z);
  cin >> X;
  for (int i = 0; i < X; i++) cin >> x[i];
  cin >> Y;
  for (int i = 0; i < Y; i++) cin >> y[i];
  cin >> Z;
  for (int i = 0; i < Z; i++) cin >> z[i];
  set<int> s;
  for (int i = 0; i < Z; i++) {
    s.insert(z[i]);
  }
  for (int i = 0; i < X; i++) {
    s.erase(x[i]);
  }
  for (int i = 0; i < Y; i++) {
    for (int j = 0; j < Z; j++) {
      if (y[i] == z[j]) {
        s.insert(y[i]);
        break;
      }
    }
  }
  cout << s.size() << endl;
}
