#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

//ABC164C
long long compare_int(const void *a, const void *b) { //sort
  return *(long long*) a - *(long long*) b;
}
int main(void) {
  int num, k,  cou=1, tmp[10], t;
  long long j,i;
  scanf(" %d", &num);
  char c[10];
  long long s[num];
  for(i=0; i < num; i++){
    s[i]=0;
    scanf(" %s", c);
    //printf("\n");
    for(j=0; c[j] != '\0'; ++j){
      s[i]+=(long long)(c[j] - 64) * pow(27, j);
      //printf("%d\n",s[i]);
    }
  }

  qsort(s, num, sizeof(long long), compare_int); //sort

  for(i=0; i < num - 1; i++){
    if(s[i]!=s[i+1])cou++;
    //printf("%lld\n", s[i]);
  }
  //printf("%lld\n", s[num-1]);
  printf("%d", cou);
  return 0;
}