#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;


int main(){
  int n;
  cin >> n;
  vector<int> a(n,0);
  vector<int> b(n,0);
  vector<int> c(n,0);

  int x;
  cin >> x;
  for(int i=0;i<x;++i){
    int y;
    cin >> y;
    a[y-1]=1;
  }
  cin >> x;
  for(int i=0;i<x;++i){
    int y;
    cin >> y;
    b[y-1]=1;
  }
  cin >> x;
  for(int i=0;i<x;++i){
    int y;
    cin >> y;
    c[y-1]=1;
  }

  int num=0;
  for(int i=0;i<n;++i){
    if((a[i]==0&&c[i]==1)||(b[i]==1&&c[i])) num++;
  }

  cout << num <<endl;
  
  return 0;
}

