function main(input) {
    let count = 0;
    const lines = input.split('\n');
    let freebie = {};
    for(let i = 1; i <= Number(lines[0]); i++){
        if(!(freebie[lines[i]])){
            freebie[lines[i]] = 0;
            count++;
        }
        freebie[lines[i]]++;
    }
    console.log(String(count));
}

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