function main(input) {
  const lines = input.split("\n");
  const N = lines[0];

  const items = {}
  for(let i = 1; i <= N; i++) {
    const name = lines[i];
    items[name] = 1;
  }
  const res = Object.keys(items).length;

  console.log(res);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));