#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  while (cin >> n) {
    int a[n + 1];
    int ans = 0;
    set<string> s;
    string s1, s2, ss;
    for (i = 1; i <= n; i++) {
      ss = "";
      cin >> s1 >> s2;
      ss = s1 + " " + s2;
      s.insert(ss);
    }
    ans = s.size();
    cout << s.size() << endl;
    s.clear();
  }
  return 0;
}
