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