#include<bits/stdc++.h>
using namespace std;
#define Rep(i,N) for(int i = 0;i < N;i++)
int main(){
  int n,ans=0;
  cin >> n;
  int a,b,c;
  int x,y,z;
  int bit[101][3];
  fill_n(*bit,101*3,0);
  cin >> a;
  Rep(i,a){
    cin >> x;
    bit[x][0]++;
  }
  cin >> b;
  Rep(i,b){
    cin >> y;
    bit[y][1]++;
  }
  cin >> c;
  Rep(i,c){
    cin >> z;
    bit[z][2]++;
  }
  for(int i = 1;i <= n;i++){
    if( bit[i][0] == 0 && bit[i][2] == 1 ) ans++;
    else if( bit[i][1] == 1 && bit[i][2] == 1) ans++;
  }
  cout << ans << endl;
 return (0);
}