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

char a[200007][14];


int main(){
  int n;
  int i,r,j;
  int ans = 0;
  int sum = 0;
  int flag = 0;
  int data[25600];

  scanf("%d", &n);

  for(i = 0;i <= 25599;i++) data[i] = 0;

  for(i = 0;i < n;i++){
    scanf("%s", a[i]);
    flag = 0;
    sum = 0;
    r = strlen(a[i]);
    for(j = 0;j < r;j++) sum += a[i][j];
    if(data[sum] == 0){
      ans++;
      data[sum] = 1;
    }
  }

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

  return 0;
}