const memo = {}

const main = stdin => {
  const input = stdin.trim().split('\n')
  const [N] = input[0].split(' ').map(x => parseInt(x))
  const set = new Set()
  for (let i = 0; i < N; i++) {
    set.add(input[i + 1])
  }

  console.log(set.size)
}


// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
