#include <bits/stdc++.h>
using namespace std;
const int P = 13331;
int main()
{
int n;
cin >> n;
getchar();
unordered_set<unsigned long long> cnt;
for (int i = 0; i < n; i++)
{
unsigned long long h[10000] = {0}, p[10000] = {0};
string a;
getline(cin, a);
h[0] = 0;
p[0] = 1;
for (int i = 0; i < a.size(); i++)
{
h[i + 1] = h[i] * P + a[i];
p[i + 1] = p[i] * P;
}
cnt.insert(h[a.size()]);
}
cout << cnt.size();
system("pause");
return 0;
}
#include <bits/stdc++.h>
using namespace std;
const int P = 13331;
int main()
{
int n;
cin >> n;
unordered_set<unsigned long long> cnt;
for (int i = 0; i < n; i++)
{
unsigned long long h[10000] = {0}, p[10000] = {0};
string a;
cin >> a;
h[0] = 0;
p[0] = 1;
for (int i = 0; i < a.size(); i++)
{
h[i + 1] = h[i] * P + a[i];
p[i + 1] = p[i] * P;
}
cnt.insert(h[a.size()]);
}
cout << cnt.size();
system("pause");
return 0;
}