function main(input) {
  const inputs = input.split('\n')
  const ss = inputs.slice(1)
  const r = {}
  ss.forEach(e => {
    r[e] = 1
  })
  // console.log(Object.keys(r))
  console.log(Object.keys(r).length)
}

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