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