#include <bits/stdc++.h>
using namespace std;
set<pair<string, string> > store;
char c[1500], c2[1500];
int main() {
  int n;
  scanf("%d", &n);
  int r = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%s%s", c, c2);
    pair<string, string> c = make_pair(::c, c2);
    if (!store.count(c)) {
      store.insert(c);
      r++;
    }
  }
  printf("%d\n", r);
  return 0;
}
