#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string buf1, buf2;
  set<string> leaves;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> buf1 >> buf2;
    leaves.insert(buf1 + buf2);
  }
  cout << leaves.size();
}
