#include <bits/stdc++.h>
int main(void) {
  int n, i, j, k, ans = 0;
  scanf("%d", &n);
  int f[n][3];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 3; ++j) f[i][j] = 0;
  for (int i = 0; i < 3; ++i) {
    int x;
    scanf("%d", &x);
    for (int j = 0; j < x; ++j) {
      int a;
      scanf("%d", &a);
      f[i][a - 1] = 1;
    }
  }
  for (int i = 0; i < n; ++i)
    if ((!f[i][0] && f[i][2]) || (f[i][1] && f[i][2])) ++ans;
  printf("%d\n", ans);
  return 0;
}
