fun main(args: Array<String>) {
  var tmp = readLine()!!.split(" ").map(String::toLong);
  val n = tmp[0];
  val map = mutableMapOf<String, Boolean>();
  var c = 0;
  for (i in 1..n) {
    val s = readLine();
    if (s != null && !map.containsKey(s)) {
      c++;
      map.set(s, true);
    }
  }
  println(c);
}
