#include <stdio.h>
#include <stdbool.h>
#include <string.h>

int makehash(char *s, int n) {
	int hash = 0;
	for(int i = 0; i < n; i++) {
		hash += (s[i] - 'a');
	}
	
	return hash;
}

int main(void) {
	int N;
	char tmp[11];
	char S[26][200000][12];
	int Snum[26] = {0};
	int len;
	int sum = 0;
	int hash;
	
	scanf("%d", &N);
	for(int i = 0; i < N; i++) {
		int j;
		
		scanf("%s", &tmp[0]);
		len = strlen(tmp);
		hash = makehash(tmp, len);
		
		for(j = 0; j < Snum[tmp[0]-'a']; j++) {
			if(S[tmp[0]-'a'][j][0] != hash) continue;
			if(strcmp(&S[tmp[0]-'a'][j][1], tmp) == 0)	{
				break;
			}
		}
		if( j == Snum[tmp[0]-'a'] ) {
			strcpy(&S[tmp[0]-'a'][j][1], tmp);
			S[tmp[0]-'a'][j][0] = hash;
			Snum[tmp[0]-'a']++;
		}
	}
	
	for(int i = 0; i < 26; i++) {
		sum += Snum[i];
	}
	
	printf("%d\n", sum);
	
	return 0;
}
