#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main() {
    long long int lli_GachaTimes = 0;
    scanf("%lld",&lli_GachaTimes);
    char **Items;
    Items = (char**)malloc(sizeof(char*)*lli_GachaTimes);
    int i;
    for (i = 0; i < lli_GachaTimes; i++) {
        Items[i] = (char*)malloc(sizeof(char) * 11);
        scanf("%s", Items[i]);
    }

    long long int lli_GachaCount = 0;
    int j = 0;
    int MachiFlag = 0;
    for (i = 0; i < lli_GachaTimes; i++) {
        for (j = i+1; j < lli_GachaTimes; j++) {
            if (Items[i][0] != Items[j][0])continue;
            if (strcmp(Items[i], Items[j]) == 0) {
                MachiFlag = 1;
                break;
            }
        }
        if (MachiFlag == 1) {
            MachiFlag = 0;
        }
        else {
            lli_GachaCount++;
        }
    }
    printf("%lld\n",lli_GachaCount);
    return 0;
}