#include <bits/stdc++.h>
int n, x, y, z;
int a[100], b[100], c[100];
int main(void) {
  int num;
  int i, ans;
  scanf("%d", &n);
  scanf("%d", &x);
  while (x--) {
    scanf("%d", &num);
    a[num - 1] = 1;
  }
  scanf("%d", &y);
  while (y--) {
    scanf("%d", &num);
    b[num - 1] = 1;
  }
  scanf("%d", &z);
  while (z--) {
    scanf("%d", &num);
    c[num - 1] = 1;
  }
  ans = 0;
  for (i = 0; i < n; i++) {
    if ((!a[n] && c[n]) || (b[n] && c[n])) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
