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



int main(){
  int n,inp,str,str2,str3,d;
  int a[101] = {};
  int b[101] = {};
  int c[101] = {};
  
  inp = 0;
  cin >> n;

  for(int i=0;i<=101;i++){
    a[i]=0;
    b[i]=0;
    c[i]=0;
  }
  cin >> str;
  if(str != 0){
    for(int i=0;i<str;i++){
      cin >> inp;
      a[inp] = 1;
    }
  }
    
  cin >> str2;
  if(str2 != 0){
    for(int i=0;i<str2;i++){
      cin >> inp;
      b[inp] = 1;
    }
  }
  
  cin >> str3;
  
  if(str3 != 0){
    for(int i=0;i<str3;i++){
      cin >> inp;
      c[inp] =1;
    }
  }
  d  = 0;
  for(int i=0;i<101;i++){
    if(b[i] == 1 && c[i] == 1)d++;
    if(a[i] == 0 && b[i] == 0 &&  c[i] == 1)d++;
  }


  cout << d << endl ;


}
  

