#include <bits/stdc++.h>
using namespace std;
const int O = 1e6 + 6;
const int Pr = 2750140;
const int T = 2e3 + 3;
const int Quao = 1e5 + 5;
const long long INF = 1e18;
long long F[O], aa[O];
vector<int> a, b, anotherb;
long long cur;
pair<long long, long long> h[O];
map<int, int> cnt, cnt0;
bool sang[Pr];
long long used[O], anotherused[O];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  map<string, int> Map;
  Map.clear();
  int n;
  cin >> n;
  cur = 0;
  while (n--) {
    string s1, s2;
    cin >> s1 >> s2;
    if (!Map[s1 + '#' + s2]) cur++;
    Map[s1 + '#' + s2]++;
  }
  cout << cur;
}
