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