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