"use strict";
function main(input) {
  const n = parseInt(input[0]);
  let s = {};

  for(let i=0;i<n;i++){
    s[input[i+1]] = true;
  }

  console.log(Object.keys(s).length);

}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));