#include <bits/stdc++.h>
using namespace std;

int n, m;
bool f[1010];

int main() {
  int ans = 0;

  cin >> n;

  memset(f, true, sizeof(f));

  cin >> m;
  for (int i = 0; i < m; ++i) {
    int a;
    cin >> a;
    f[a] = false;
  }

  cin >> m;
  for (int i = 0; i < m; ++i) {
    int a;
    cin >> a;
    f[a] = true;
  }

  cin >> m;
  for (int i = 0; i < m; ++i) {
    int a;
    cin >> a;
    if (f[a]) ans++;
  }

  cout << ans << endl;
}