#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, k[105], l[105], m[105], ans = 0;
  bool sina;
  cin >> n >> a;
  for (int i = 0; i < a; ++i) {
    cin >> k[i];
  }
  cin >> b;
  for (int i = 0; i < b; ++i) {
    cin >> l[i];
  }
  cin >> c;
  for (int i = 0; i < c; ++i) {
    cin >> m[i];
  }
  for (int i = 1; i <= c; ++i) {
    sina = true;
    for (int j = 0; j < a; ++j) {
      if (k[j] == m[i]) sina = false;
    }
    for (int j = 0; j < b; ++j) {
      if (l[j] == m[i]) sina = false;
    }
    if (sina) ans++;
  }
  cout << ans << endl;
}
