#include <bits/stdc++.h>
int main(void) {
  int n, x, y, z, i, j, flg, cnt, cnt1, cnt2;
  int a[101], b[101], c[101];
  scanf("%d %d", &n, &x);
  for (i = 0; i < x; i++) scanf("%d", &a[i]);
  scanf("%d", &y);
  for (i = 0; i < y; i++) scanf("%d", &b[i]);
  scanf("%d", &z);
  for (i = 0; i < z; i++) scanf("%d", &c[i]);
  cnt = 0;
  for (i = 0; i < x; i++) {
    for (j = 0; j < z; j++) {
      if (a[i] == c[j]) {
        c[j] = 0;
        cnt++;
      }
    }
  }
  cnt1 = 0;
  flg = 0;
  if (cnt != 0) {
    for (i = 0; i < z; i++) {
      if (c[i] != 0) cnt1++;
    }
  }
  if (cnt1 != 0) flg = 1;
  cnt2 = 0;
  if (cnt1 == 0) {
    for (i = 0; i < y; i++) {
      for (j = 0; j < z; j++) {
        if (b[i] == c[j]) cnt2++;
      }
    }
  }
  if (cnt1 == 0 && cnt2 == 0) cnt2 = z;
  if (flg == 1)
    printf("%d\n", cnt1);
  else
    printf("%d\n", cnt2);
  return 0;
}
