'use strict'

function main(input) {
    const n = Number(input.split('\n')[0].split(' ')[0]);
    let s = [];
    let count = 0;

    for (let index = 0; index < n; index++) {
        if (!(s.includes(String(input.split('\n')[1+index].split(' ')[0])))) {
            count++;
        }
        s[index] = String(input.split('\n')[1+index].split(' ')[0]);
    }
    console.log(count);
}

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