#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x[101], y[101], z[101], X, Y, Z, count = 0;
  cin >> n;
  cin >> X;
  for (int i = 0; i < X; i++) {
    cin >> x[i];
  }
  cin >> Y;
  for (int i = 0; i < Y; i++) {
    cin >> y[i];
  }
  cin >> Z;
  for (int i = 0; i < Z; i++) {
    cin >> z[i];
  }
  sort(x, x + X);
  sort(y, y + Y);
  sort(z, z + Z);
  for (int i = 0; i < Z; i++) {
    if (z[i] > n) {
      continue;
    }
    for (int j = 0; j < X; j++) {
      if (x[i] > n) {
        continue;
      }
      if (z[i] == x[j]) {
        break;
      }
      if (z[i] != x[j] && j < X - 1) {
        continue;
      }
      if (z[i] != x[j] && j == X - 1 && z[i] != -1) {
        count++;
        z[i] = -1;
      }
    }
  }
  for (int i = 0; i < Y; i++) {
    if (y[i] > n) {
      continue;
    }
    for (int j = 0; j < Z; j++) {
      if (z[i] > n) {
        continue;
      }
      if (y[i] == z[j] && z[j] != -1) {
        count++;
        z[j] = -1;
      }
    }
  }
  cout << count << endl;
  return 0;
}
