#include <bits/stdc++.h>
int main(void) {
  int a[3][100], n, m, k, sk, t, ans = 0;
  for (n = 0; n < 3; n++) {
    for (m = 0; m < 100; m++) {
      a[n][m] = 0;
    }
  }
  scanf("%d", &k);
  for (n = 0; n < 3; n++) {
    scanf("%d", &sk);
    if (sk != 0) {
      for (m = 0; m < sk; m++) {
        scanf("%d", &t);
        a[n][t] = 1;
      }
    }
  }
  for (n = 0; n < k; n++) {
    if (a[2][n] == 1 && a[0][n] == 0) {
      ans++;
    } else if (a[2][n] == 1 && a[1][n] == 1) {
      ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
