
function Main(input) {
    var N = parseInt(input[0], 10);
    var a = input.slice(1).map(e => parseInt(e, 10));

    var set = new Set(a);

    console.log(set.size);
}

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