#include <bits/stdc++.h>
using namespace std;
int main() {
  multimap<string, string> leaves;
  int totalLeaves;
  cin >> totalLeaves;
  for (int leaf = 1; leaf <= totalLeaves; leaf++) {
    string species, color;
    cin >> species;
    cin >> color;
    bool newLeaf = true;
    for (multimap<string, string>::iterator it = leaves.begin();
         it != leaves.end(); ++it) {
      if (it->first.compare(species) == 0) {
        if (it->second.compare(color) == 0) {
          newLeaf = false;
          break;
        }
      }
    }
    if (newLeaf) leaves.insert(make_pair(species, color));
  }
  cout << leaves.size() << endl;
  return 0;
}
