// #include<bits/stdc++.h>
#include<algorithm>
#include<iostream>
#define int long long
using namespace std;
const unsigned int p = 1145141;
pair<unsigned int, unsigned int >hasht[1000000];
char sx[20000];
signed main() {
register unsigned int k;
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
cin >> k;
register auto enda = hasht + k;
while(k --) {
cin >> sx;
register unsigned int now1 = 0, now2 = 0;
for(register char c : sx)
if(c)
now1 = (now1 * p ^ c) ,
now2 = (now2 * p ^ c);
else break;
// s.push_back({now1, now2});
hasht[k] = {now1, now2};
}
sort(hasht, enda);
cout << unique(hasht, enda) - hasht ;
return 0;
}
rt,单哈希可过