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

struct node{
	char *word;
	int frequency;
	struct node *left;
	struct node *right;
};

int Word_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}
void Copy_Str(char *from, char *to){
	while(*to++ = *from++)
		;
}
int Comp_Strs(char *str1, char *str2){
	for(; *str1 == *str2; str1++, str2++)
		if(*str1 == '\0')
			return 0;
	return *str1 - *str2;
}
struct node *Create_bTree(struct node *root, char *str, int *count_words){
	int distance;
	if(root == NULL){
		(*count_words)++;
		root = (struct node *) malloc(sizeof(struct node));
		root->word = (char *) malloc(sizeof(char) * (Word_Length(str)+1));
		Copy_Str(str, root->word);
		root->frequency = 1;
		root->right = root->left = NULL;
	}
	else if((distance = Comp_Strs(root->word, str)) == 0){
		root->frequency++;
	}
	else if(distance > 0){
		root->right = Create_bTree(root->right, str, count_words);
	}
	else{
		root->left = Create_bTree(root->left, str, count_words);
	}
	return root;
}
void Free_bTree(struct node *root){
	if(root != NULL){
		Free_bTree(root->left);
		free(root->word);
		free(root);
		Free_bTree(root->right);
	}
}
int main(){
	int n_words, count_words = 0;
	scanf("%d", &n_words);
	char str_temp[11];
	struct node *root;
	root = NULL;
	for(int str_i = 0; str_i < n_words; str_i++){
		scanf("%s", str_temp);
		root = Create_bTree(root, str_temp, &count_words);
	}
	printf("%d", count_words);
	Free_bTree(root);
	return 0;
}