#include <bits/stdc++.h>
using namespace std;
set<pair<string, string> > sett;
string s1, s2;
int n, ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> s1 >> s2;
    if (!sett.count(make_pair(s1, s2))) {
      ++ans;
      sett.insert(make_pair(s1, s2));
    }
  }
  cout << ans << '\n';
  return 0;
}
