a, b, c = io.read("*n", "*n", "*n")
r = 0
if a ~= b and b ~= c and c ~= a then
	r = 3
elseif a == b and c ~= a then
	r = 2
elseif b == c and a ~= b then
	r = 2
elseif c == a and b ~= c then
	r = 2
else
	r = 1
end
print(r)
