#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  
  vector<string> v(N) ;{
    for (int i = 0; i < N; i++) {
  cin >> v.at(i);
    }
  }
  
  sort(v.begin() ,v.end());
  
  int a=0;
  
  for (int i= 1 ; i<N; i++) {
    if(v.at(i) != v.at(i-1)){ a++
                            }
  }
  cout << a<< endl;
}