'use strict';

function Main(input) {
    const tmp = input.split(' ');
    const ary = tmp.filter((x, i, self) => self.indexOf(x) === i);

    console.log(ary.length)
}

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