#include <stdio.h>

#define HASH 10007

typedef struct List {
	struct List *next;
	char s[11];
} list;

int hash_string(char* s)
{
	long long x = 0;
	int i;
	for (i = 0; s[i] != 0; i++) {
		x += s[i] - 'a';
		x = x << 5;
	}
	return x % HASH;
}

int lex_smaller(char* s1, char* s2)
{
	int i;
	for (i = 0; s1[i] != 0 && s2[i] != 0; i++) {
		if (s1[i] < s2[i]) return 1;
		else if (s1[i] > s2[i]) return -1;
	}
	if (s1[i] == s2[i]) return 0;
	else if (s1[i] == 0) return 1;
	else return -1;
}

int main()
{
	int h, i, j, N, count = 0;
	char S[11];
	list *p, *hash[HASH] = {}, d[200001];
	scanf("%d", &N);
	for (i = 1; i <= N; i++) {
		scanf("%s", S);
		h = hash_string(S);
		for (p = hash[h]; p != NULL; p = p->next) if (lex_smaller(p->s, S) == 0) break;
		if (p == NULL) {
			count++;
			for (j = 0; S[j] != 0; j++) d[i].s[j] = S[j];
			d[i].s[j] = 0;
			d[i].next = hash[h];
			hash[h] = &(d[i]);
		}
	}
	printf("%d\n", count);
	fflush(stdout);
	return 0;
}