function Main (input) {
  input = input.split("\n");
  var N = parseInt(input[0], 10);
  input.pop();
  input.shift();
  var S = input;
  S.sort((a, b) => b > a);
  var ans = 0;
  S.forEach((e, i) => {
    if (e != S[i-1]) {
      ans++;
    }
  })
  console.log(ans);
}

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