#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a_po;
  int a[a_po];
  int count = 0;
  cin >> a_po;
  for (int i = 0; a_po > i; i++) {
    cin >> a[i];
  }
  int b_po;
  cin >> b_po;
  int b[b_po];
  for (int i = 0; b_po > i; i++) {
    cin >> b[i];
  }
  int c_po;
  cin >> c_po;
  int c[c_po];
  for (int i = 0; c_po > i; i++) {
    bool have = false;
    bool bs = false;
    bool a_s = false;
    cin >> c[i];
    for (int j = 0; a_po > j; j++) {
      if (c[i] == a[j]) {
        a_s = true;
        for (int k = 0; b_po > k; k++) {
          if (c[i] == b[k]) {
            have = true;
            bs = true;
            break;
          }
        }
        if (bs) {
          break;
        }
      }
    }
    if (!a_s) {
      have = true;
    }
    if (have) count++;
  }
  cout << count << endl;
}
