#include <bits/stdc++.h>
int main(void) {
  int a[101][3] = {0}, N, X, Y, Z, q, w, e, r, t, y, u, i = 0;
  scanf("%d", &N);
  scanf("%d", &X);
  for (q = 0; q < X; q++) {
    scanf("%d", &r);
    a[r][0] = 1;
  }
  scanf("%d", &Y);
  for (w = 0; w < Y; w++) {
    scanf("%d", &t);
    a[t][1] = 1;
  }
  scanf("%d", &Z);
  for (e = 0; e < Z; e++) {
    scanf("%d", &y);
    a[y][2] = 1;
  }
  for (u = 1; u <= N; u++) {
    if (a[u][0] == 0 && a[u][2] == 1 || a[u][1] == 1 && a[u][3] == 1) i++;
  }
  printf("%d\n", i);
  return 0;
}
