#include <bits/stdc++.h>
const double eps = 1e-8;
const int oo = 0x3f3f3f3f;
using namespace std;
int n;
string a, b;
bool read() {
  if (!(cin >> n)) return false;
  return true;
}
void process() {
  set<pair<string, string>> types;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    types.insert({a, b});
  }
  cout << types.size() << endl;
}
int main() {
  int t = -1;
  while (t-- && read()) {
    process();
  }
  return 0;
}
