#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  string b;
  int n;
  cin >> n;
  set<string> s1;
  set<string>::iterator itr;
  if (n > 0 && n <= 100) {
    for (int i = 0; i < n; i++) {
      cin >> a;
      cin >> b;
      string c = a + " " + b;
      transform(c.begin(), c.end(), c.begin(), ::toupper);
      s1.insert(c);
    }
  }
  if (n > 0 && n <= 100) {
    int count = 0;
    for (itr = s1.begin(); itr != s1.end(); itr++) {
      count++;
    }
    cout << count << endl;
  }
}
