#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z, a[101], b[101], c[101], count = 0;
  bool bo = false;
  cin >> n;
  cin >> x;
  for (int i = 0; i < x; i++) {
    cin >> a[i];
  }
  cin >> y;
  for (int i = 0; i < y; i++) {
    cin >> b[i];
  }
  cin >> z;
  for (int i = 0; i < z; i++) {
    cin >> c[i];
  }
  for (int i = 0; i < z; i++) {
    for (int j = 0; j < y; j++) {
      if (c[i] == b[j]) {
        count++;
        c[i] = -1;
      }
    }
    if (c[i] != -1) {
      for (int j = 0; j < x; j++) {
        if (c[i] == a[j]) {
          break;
        }
        if (j == x - 1) {
          count++;
        }
      }
    }
  }
  cout << count << endl;
  return 0;
}
