const Main = () => {
    const line = require('fs').readFileSync('/dev/stdin', 'utf8');
    const lines = line.split('\n');
    const N = parseInt(lines[0], 10);
    const S = {};
    for (let i = 1; i <= N; i++) {
        S[lines[i]] = true;
    }
    const count = Object.keys(S).length;
    console.log(count);
}

Main();