const Main = (input) => {
  const result = input.split(' ').reduce((accumulator, currentValue) => {
    if (!accumulator.includes(currentValue)) {
      accumulator.push(currentValue);
    }

    return accumulator;
  }, []);

  //output
  console.log(`${result.length}`);
};

// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));