#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];}

int main(){
  int n;
  int a[101],b[101];
  lp(i,101){
    a[i]=0;
    b[i]=0;
  }
  cin>>n;
  int x;
  cin>>x;
  lp(i,x){
    int c;
    cin>>c;
    a[c]++;
    b[c]--;
  }
  cin>>x;
  lp(i,x){
    int c;
    cin>>c;
    a[c]++;
  }
  cin>>x;
  lp(i,x){
    int c;
    cin>>c;
    a[c]++;
    b[c]++;
  }
  int ans=0;
  lp(i,n+1){
    if(i==0) continue;
    if(a[i]==3 || b[i]==1) ans++;
  }
  cout<<ans<<endl;
  return 0;
}

