#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<string> a;
  vector<string> b(n + 1);
  string s;
  int i = 0;
  while (getline(cin, s)) {
    b[i] = s;
    i++;
  }
  for (int i = 0; i <= n; i++) a.insert(b[i]);
  cout << a.size() - 1;
  return 0;
}
