#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<pair<string, string> > v;
  int n;
  cin >> n;
  string s1, s2;
  for (int i = 0; i < n; i++) {
    cin >> s1 >> s2;
    v.push_back({s1, s2});
  }
  sort(v.begin(), v.end());
  int mx = unique(v.begin(), v.end()) - v.begin();
  cout << mx << '\n';
  return 0;
}
