const main = (input) => {
  const args = input.split('\n')
  const items = args.filter((_, i) => i > 0)
  console.log(Array.from(new Set(items)).length)
}

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