'use strict'

function main(input) {
  const nums = input.split('\n').map(n => parseInt(n, 10))
  const mochis = nums.slice(1, nums.length)

  console.log(mochis.filter((n, i) => mochis.indexOf(n) === i).length)
}

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