"use strict";

function main(input) {
  input = input
    .split(/\n|\s/)
    .map(v => ~~v)
    .slice(1, input.length);
  input.sort((a, b) => {
    return b - a;
  });

  let prev = 0;
  let ans = 0;

  for (let i = 0; i < input.length; i++) {
    if (i === 0 || input[i] < prev) ans++;
    prev = input[i];
  }

  console.log(ans);
}

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