function Main(input) {
    var N = parseInt(input[0], 10);
    var S = input.slice(1);

    var freebie = new Map();

    for (var i = 0; i < N; i++) {
        freebie.set(S[i], true);
    }

    console.log(freebie.size);
}

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