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

int main(void)
{
  int N, a;
  scanf("%d", &N);

  char S[N][11];
  for(int i = 0; i < N; i++){
    scanf("%s", S[i]);
  }

  int count = 0;

  qsort(S,N,11,strcmp);

  for(int i = 0; i < N-1; i++){
    a = strcmp(S[i], S[i+1]);
    if(a != 0){
      count += 1;
    }
  }


  printf("%d\n", count);

  return 0;
  }
