#include <bits/stdc++.h>
using namespace std;
const int Mn = 1e3 + 7;
const int M = 1e4 + 7;
const int N = 1e5 + 7;
const int Mx = 1e6 + 7;
const long long INF = 1e18 + 7;
int n, m, ans;
set<pair<string, string>> q;
int main() {
  ios_base::sync_with_stdio(NULL), cin.tie(0), cout.tie(0);
  cin >> n;
  ans = n;
  while (n--) {
    string s, y;
    cin >> s >> y;
    q.insert({s, y});
  }
  cout << ((int)(q).size());
  return false;
}
