function main(input) {
  const args = input.split('\n')
  const N = Number(args[0])
  const items = args.slice(1, N - 1)

  console.log(Array.from(new Set(items)).length)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))