"use strict";

function main(arg){
  const input = arg.trim().split(' ');
  const n = input.filter((e, index, self) => {return self.indexOf(e)===index}).length;
  console.log(n)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));  