#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z, count = 0, ans = 0;
  int a[110], b[110], c[110];
  cin >> n;
  cin >> x;
  for (int i = 0; i < x; i++) cin >> a[i];
  cin >> y;
  for (int i = 0; i < y; i++) cin >> b[i];
  cin >> z;
  for (int i = 0; i < z; i++) {
    cin >> c[i];
    ans++;
  }
  for (int i = 0; i < x; i++)
    for (int i = 0; i < z; i++)
      if (c[i] == a[i]) count++;
  for (int i = 0; i < y; i++)
    for (int i = 0; i < z; i++)
      if (c[i] == b[i]) count++;
  for (int i = 0; i < y; i++) {
    for (int j = 0; j < z; j++) {
      if (c[j] == b[i]) count++;
    }
  }
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < y; j++) {
      for (int k = 0; k < z; k++) {
        if (c[k] == b[j] && b[j] == a[i]) count++;
      }
    }
  }
  cout << ans - count << endl;
  return 0;
}
