function main(input){
  var str = input.split('\n');
  var times = parseInt(str[0]);
  var riceCakes = [];
  for(let i=1;i<str.length;i++){
    riceCakes.push(parseInt(str[i]));
  }
  riceCakes.sort(function(x,y){return x-y;})
  for(let j=0;j<times-1;j++){
    if(riceCakes[j+1]-riceCakes[j] === 0){
      riceCakes.splice(j,1,0);
    }
  }
  var result = riceCakes.filter(function(value,index,array){
    return value > 0;
  })
  console.log(result.length)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));