#include <stdio.h>
#define rep(i, n) for(int i = 0; i < n; ++i)

int main(void) {
  int n, i, j, k, ans = 0;
  scanf("%d", &n);
  int f[n][3];
  rep(i, n) rep(j, 3) f[i][j] = 0;
  rep(i, 3) {
    int x;
    scanf("%d", &x);
    rep(j, x) {
      int a;
      scanf("%d", &a);
      f[a - 1][i] = 1;
    }
  }
  /*rep(i, 3) {
    rep(j, n) printf("%d ", f[j][i]);
    printf("\n");
  }*/
  rep(i, n) if((!f[i][0] && f[i][2]) || (f[i][1] && f[i][2])) ++ans;
  printf("%d\n", ans);
  return 0;
}
