function Main(input) {
    var list = input.filter((v,i)=>i>0);
    var map = {};
    list.forEach(v=>map[v]=true);
    console.log(Object.keys(map).length);
}



Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n"));