function main(input) {
  var N = input[0];
  var S = input.slice(1);
  var setData = new Set(S);
  console.log(setData.size);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));