#include <set>
#include <stdio.h>
using namespace std;
int main(){
    set<int> a,b;
    int n,temp,ans=0;
    scanf("%d",&n);
    scanf("%d",&n);
    while(n--){
        scanf("%d",&temp);
        a.insert(temp);
    }
    scanf("%d",&n);
    while(n--){
        scanf("%d",&temp);
        b.insert(temp);
    }
    scanf("%d",&n);
    while(n--){
        scanf("%d",&temp);
        if(b.find(temp)!=b.end())ans++;
        else if(a.find(temp)==a.end())ans++;
    }
    
    printf("%d\n",ans);
}
