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

struct node{
	struct node *n[26];
	int g;
};

struct node *new(){
	struct node *n = (struct node *)malloc(sizeof(struct node));
	for(int i = 0; i < 26; i++){
		n->n[i] = NULL;
	}
	n->g = 0;
	return n;
}

struct node *find(char c, struct node *n){
	if(n->n[c-'a']!=NULL) {/*printf("found %c at %d\n",c,c-'a');*/ return n->n[c-'a'];}
	else{
		//printf("didn't find %c\n", c);
		n->n[c-'a'] = new();
		return n->n[c-'a'];
	}
}

int main(void){
	
	int n;
	scanf("%d",&n);
	char temp[11];
	int count = 0;
	struct node *nod = new();
	struct node *now = NULL;
	
	for(int i = 0; i < n; i++){
		scanf("%s",temp);
		now = nod;
		for(int j = 0; temp[j]!='\0'; j++){
			now = find(temp[j],now);
		}
		if(now->g == 0) {count++; now->g = 1;}
	}
	printf("%d",count);
}