#include<stdio.h>
signed main(){
    int N,i,d;
    int K,A[1000];
    scanf("%d %d",&N,&K);
    scanf("%d",&d);
    for(i=0;i<d;i++){
        scanf("%d",&A[i]);
    }
    int g;
    scanf("%d",&g);
    for(i=0;i<K;i++){
        scanf("%d",&A[i]);
    }
    printf("%d\n",N-d);
    return(0);
}