#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[101][3] = {0}, sum = 0, m, z;
  cin >> n;
  cin >> m;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    a[k][0] = 1;
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    a[k][1] = 1;
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    a[k][2] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (a[i][0] != 1 && a[i][2] == 1) {
      sum++;
    } else if (a[i][1] == 1 && a[i][2] == 1) {
      sum++;
    }
  }
  cout << sum << '\n';
  return 0;
}
