function main(argString) {
  	console.log(argString.replace(/\r/g, '').split('\n').slice(1).filter((x, i, self) => self.indexOf(x) === i).length);
}
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));
