#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
void solve() {
  int i, j, n, m;
  cin >> n;
  vector<pair<string, string>> a(n);
  for (i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  set<pair<string, string>> chosen;
  int ans = 0;
  for (i = 0; i < n; i++) {
    if (chosen.find(a[i]) == chosen.end()) {
      chosen.insert(a[i]);
      ans++;
    }
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
