#include <bits/stdc++.h>
using namespace std;
typedef struct {
  string name;
  string color;
} T1;
struct T1Less {
  bool operator()(const T1& a, const T1& b) const {
    if (a.name != b.name)
      return a.name < b.name;
    else
      return a.color < b.color;
  }
};
set<T1, T1Less> S;
int main() {
  int n;
  cin >> n;
  T1 buf;
  for (int i = 0; i < n; i++) {
    cin >> buf.name >> buf.color;
    S.insert(buf);
  }
  cout << S.size();
  return 0;
}
