#include <bits/stdc++.h>
using namespace std;
int N, X, t;
unsigned p[101] = {0};
int main() {
  scanf("%d", &N);
  for (int i = 0; i < 3; i++) {
    scanf("%d", &X);
    for (int j = 0; j < X; j++) {
      scanf("%d", &t);
      p[t] |= (1 << i);
    }
  }
  int ans = 0;
  for (int i = 1; i <= N; i++) {
    if ((p[i] & 4) && !(p[i] & 1)) {
      ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
