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