function Main(input) {
  input = input.trim().split(" ");
  var data = input.map((n) => parseInt(n, 10));
 
  data = data.filter((v, i) => {
    return data.indexOf(v) === i;
  });
  console.log(data.length);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));