#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T &xxx) {
  for (auto &it : xxx) cout << it << " ";
  cout << "\n";
}
void solve() {
  long long n;
  cin >> n;
  string s, t;
  set<string> st;
  while (n--) {
    cin >> s >> t;
    st.insert(s + "#" + t);
  }
  cout << st.size() << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
