#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> V[3];
  set<int> S[3];
  for (int i = 0; i < 3; i++) {
    int s, t;
    cin >> s;
    while (s--) {
      cin >> t;
      V[i].push_back(t);
      S[i].insert(t);
    }
  }
  int cnt = 0;
  for (int i = 0; i < V[2].size(); i++) {
    if (S[0].find(V[2][i]) == S[0].end()) cnt++;
    if (S[1].find(V[2][i]) != S[1].end()) cnt++;
  }
  cout << cnt << endl;
}
