#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0, a = 0, count = 0, b = 0;
  cin >> n;
  int x[3][100];
  for (int i = 0; i < 3; i++) {
    cin >> a;
    for (int j = 0; j < a; j++) {
      cin >> b;
      x[i][b] = 1;
    }
  }
  for (int j = 0; j < a; j++) {
    if (x[1][j] == 0 && x[3][j] == 1) {
      count++;
    }
    if (x[2][j] == 1 && x[3][j] == 1) {
      count++;
    }
    if (x[1][j] == 0 && x[2][j] == 1 && x[3][j] == 1) {
      count--;
    }
  }
  cout << count << endl;
}
