function Main(input) {
    var input = input.split("\n");
    var colors = input[0].split(" ");

    var filteredColors = colors.filter(
	function (x, i, self) {
	    return self.indexOf(x) === i;
	}
    );

    console.log(filteredColors.length);
}

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