"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const S = arg.slice(1, N + 1);
    
    let list = [];
    
    for(let i=0; i<N; i++) {
        list.push(S[i]);
    }
    
    const sets = new Set(list);
    
    console.log(sets.size);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));