#include <stdio.h>
#include <stdlib.h>

struct cell{
	struct cell *next[30];
	int e;
};

int main(void){
	int n,i,s,c,changed,j;
	
	struct cell head;
	struct cell *p;
	
	for(i=0;i<30;i++)
	 head.next[i]=NULL;
	head.e=0;
	
	s=0;
	
	scanf("%d",&n);
	getchar();
	for(i=0;i<n;i++){
	 p=&head;
		changed=0;
	 while((c = getchar()) != '\n'){
	 	if(p->next[c-'a']==NULL){
	 		changed=1;
	 		p->next[c-'a']=(struct cell *)malloc(sizeof(struct cell));
	 		p=p->next[c-'a'];
	 		for(j=0;j<30;j++)
	 		p->next[j]=NULL;
	 		p->e=0;
	 		//printf("m");
	 	}
	 	else{
	 	 p=p->next[c-'a'];
	 		//printf("else");
	 	}
	 }
		if(changed==0 && p->e == 0){p->e=1; changed=1;}
	 s+=changed;
	}
	
	printf("%d\n",s);
	
	return 0;
}