#include <stdio.h>
#include <string.h>
void px (char s1[]);
char s1[10000][101]={0};
int main ()
{
int n,m,i,k = 0;
scanf ("%d",&n);
for (i = 0;i<n;i++)
scanf ("%s",s1[i]);
for (i = 0;i<n;i++)
{
px(s1[i]);
}
for (i = 0;i<n-1;i++)
{
if (s1[i][0]=='0')
continue;
for (m = i+1;m<n;m++)
{
if (strcmp(s1[i],s1[m])==0)
{
k++;
s1[m][0]='0';//标记该单词已经分好类
}
}
}
if (s1[n-1][0]!='0')
k++;
printf ("%d",k);
return 0;
}
void px (char s1[])
{
int i,n,k,m;
for (i = 0;i<strlen(s1)-1;i++)
{
for (m = 0;m<strlen(s1)-i-1;m++)
{
if (s1[m]>s1[m+1])
{
char temp;
temp = s1[m];
s1[m]=s1[m+1];
s1[m+1] = temp;
}
}
}
return ;
}