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

int conv_num(char a);
int main()
{
    int ans_i[26] = {0};
	int count,ans = 0;
	char data[26][200000][11];
	scanf("%d",&count);
    // printf("%d",conv_num('z'));

	for(int i = 0;i < count;i++){
		char temp[11];
		scanf("%s",temp);
		if(ans_i[conv_num(temp[0])] != 0){
			for(int j = 0;j < ans_i[conv_num(temp[0])];j++){
				if(!strcmp(temp,data[conv_num(temp[0])][j])){
					break;
				}
				else if(j == ans -1){
					strcpy(data[conv_num(temp[0])][ans],temp);
					ans_i[conv_num(temp[0])]++;
                    ans++;
				}
			}
		}
		else{
			strcpy(data[conv_num(temp[0])][0],temp);
            ans_i[conv_num(temp[0])]++;
			ans++;
			// printf("%s\n",temp);
		}
	}
	printf("%d",ans);

	return 0;
}

int conv_num(char a){
    return a - 'a';
}
