#include <bits/stdc++.h>
using namespace std;
int N, X, Y, Z, ans;
int a[101], b[101], c[101], p[101][3];
int main() {
  cin >> N >> X;
  for (int i = 0; i < X; i++) {
    cin >> a[i];
    p[a[i]][0] = 1;
  }
  cin >> Y;
  for (int i = 0; i < Y; i++) {
    cin >> b[i];
    p[b[i]][1] = 1;
  }
  cin >> Z;
  for (int i = 0; i < Z; i++) {
    cin >> c[i];
    p[c[i]][2] = 1;
  }
  for (int i = 0; i < N; i++)
    if (p[i][2] && !p[i][0] || p[i][1]) ans++;
  cout << ans << endl;
  return 0;
}
