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