#include <bits/stdc++.h>
using namespace std;
int main() {
  set<pair<string, string> > s;
  int n;
  cin >> n;
  while (n--) {
    string s1, s2;
    cin >> s1 >> s2;
    s.insert(make_pair(s1, s2));
  }
  cout << s.size();
}
