'use strict'

const main = input => {
	const args = input.split('\n')
	const n = parseInt(args[0], 10)
	const d = args.slice(1, n + 1).map(arg => parseInt(arg, 10))
	let before = 101
	let cnt = 0

	for (let i = 0; i < n; i++) {
		let _max = 0

		for (let j = 0; j < n; j++) {
			if (d[j] < before) {
				_max = Math.max(_max, d[j])
			}
		}

		if (_max > 0) {
			before = _max
			cnt++
		}
	}

	console.log(cnt)
}

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