#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const ll N=1e5+10;
ull mod = 1000000000000002493;
string has[N];
string a[N];
bool check(string str){
int x=0;
for(int i=0;i<str.length();i++){
x+=str[i];
}
x%=mod;
while(has[x][0]){
if(str==has[x])return true;
x++;
x%=mod;
}
has[x]=str;
return false;
}
int main(){
int n;
int sum=0;
bool flag=false;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
if(!check(a[i]))flag=true;
if(flag)sum++;
flag=false;
}
cout<<sum;
system("pause");
return 0;
}