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

signed main(){
  set<int> A,B,C;

  int s;
  cin>>s;
  cin>>s;
  for(int i=0,a;i<s;i++) cin>>a,A.insert(a);
  cin>>s;
  for(int i=0,a;i<s;i++) cin>>a,B.insert(a);
  cin>>s;
  for(int i=0,a;i<s;i++) cin>>a,C.insert(a);

  //for(int p:C) cout<<p<<endl;
  
  for(int p:A)
    if(!B.count(p) && C.count(p)) C.erase(p);

  //for(int p:C) cout<<p<<endl;
  
  cout<<C.size()<<endl;
  
  return 0;
}