#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a, ans = 0, data[101] = {};
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a);
    data[a] = 1;
  }
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a);
    data[a] |= 2;
  }
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a);
    data[a] |= 4;
  }
  for (int i = 1; i <= n; i++) {
    if (data[i] == 4 || data[i] == 5 || data[i] == 7) ans++;
  }
  cout << ans << endl;
  return 0;
}
