const main = (input) => {
  const [, ...rows] = input.trim().split('\n')
  const ans = {}

  for (let v of rows) ans[v] = true
  return console.log(Object.keys(ans).length)
}

process.env.MYTEST ? test() : main(require('fs').readFileSync('/dev/stdin', 'utf8'))