#include<stdio.h>
#include<string.h>
int main(){
    int k, count = 0;
    char restricted[50][101];
    char word[101];
    scanf("%d", &k);
    for (int i = 0; i < k; i++)
    {
        scanf("%s",restricted[i]);
    }
    FILE *fp = fopen("testdata.txt","r");
    if (fp == NULL){
        printf("Error: cannot open testdata.txt\n;");
        return 1;
    }
    while (fscanf(fp, "%s",word) != EOF){
        for (int i = 0; i<k; i++){
            if(strcmp(word restricted[i]) == 0){
                count++;
            }
        }
    }
    fclose(fp);
    printf("total no. of keywords found :%d", count);
    return 0;
}