#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int X;
  cin >> X;
  int a[100];
  for (int i = 0; i < X; i++) {
    cin >> a[i];
  }
  int Y;
  cin >> Y;
  int b[100];
  for (int i = 0; i < Y; i++) {
    cin >> b[i];
  }
  int Z;
  cin >> Z;
  int c[100];
  for (int i = 0; i < Z; i++) {
    cin >> c[i];
  }
  int count = 0;
  for (int i = 0; i < Z; i++) {
    for (int j = 0; j < X; j++) {
      if (a[j] != c[i] && j == X - 1) {
        count++;
        c[i] = 0;
      } else if (a[j] == c[i]) {
        break;
      }
    }
  }
  for (int i = 0; i < Z; i++) {
    for (int j = 0; j < Y; j++) {
      if (b[j] == c[i]) {
        count++;
        c[i] = 0;
      }
    }
  }
  cout << count << endl;
  return 0;
}
