#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<pair<string, string>> S;
  string r, s;
  for (int i = 0; i < n; i++) {
    cin >> r >> s;
    S.insert({r, s});
  }
  cout << S.size() << "\n";
  return 0;
}
