#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0;
  string a, b;
  vector<pair<string, string> > vec;
  cin >> n;
  while (n--) {
    cin >> a >> b;
    vec.push_back(make_pair(a, b));
  }
  n = 0;
  sort(vec.begin(), vec.end());
  while (i < vec.size()) {
    n++;
    while (i < vec.size() - 1 && vec[i].first == vec[i + 1].first &&
           vec[i].second == vec[i + 1].second)
      i++;
    i++;
  }
  cout << n << endl;
}
