function Main(input){
  input = input.split(' ').map(num => Number(num));

  var array = ['a'];

  input.map(compare => {
    if(input.indexOf(compare) == input.lastIndexOf(compare)){
      array.push(compare);
    }
});
  
  var total = array.length;
  if(total > 3) {
      total = total - 1;
  }
  console.log(total);

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