#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> dic;
  for (int _n(n), i(0); i < _n; i++) {
    string a, b;
    cin >> a >> b;
    dic.push_back(a + "_" + b);
  }
  sort((dic).begin(), (dic).end());
  cout << unique((dic).begin(), (dic).end()) - dic.begin() << endl;
  return 0;
}
