#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  while (b) {
    long long tmp = a % b;
    a = b;
    b = tmp;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  long long n, x, y, z;
  cin >> n;
  vector<long long> target(n);
  for (int i = 0; i < (n); i++) target[i] = i + 1;
  cin >> x;
  vector<long long> a(x);
  for (int i = 0; i < (x); i++) cin >> a[i];
  cin >> y;
  vector<long long> b(y);
  for (int i = 0; i < (y); i++) cin >> b[i];
  cin >> z;
  vector<long long> c(z);
  for (int i = 0; i < (z); i++) cin >> c[i];
  set<long long> ans;
  for (long long i : b)
    if (find(c.begin(), c.end(), i) != c.end()) {
      ans.insert(i);
      if (false) cout << "insert:" << i << endl;
    }
  vector<long long> notA(target);
  for (long long i : a) remove(notA.begin(), notA.end(), i);
  for (long long i : notA)
    if (find(c.begin(), c.end(), i) != c.end()) {
      ans.insert(i);
      if (false) cout << "insert:" << i << endl;
    }
  cout << ans.size() << endl;
  return 0;
}
