'use strict';
const p = s => console.log(s);
// let a,b,c,d;
// [a,b,c,d] = input[0].trim().split(" ").map(i => parseInt(i));

function main(input) {
  let N = input[0].split(" ")[0];
  input.shift();
  let map = new Map();

  let i,cnt =0;
  for(i=0 ; i< N;i++) {
    if(map[input[i]]) continue;
    else {
      map[input[i]] = 1;
      cnt++;
    }
  }
  p(cnt);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));
