import Text.Regex

main::IO()
main =do
  abc<-getLine
  let dat = map read (words abc)::[Int]
  print (solver dat)

solver::[Int]->Int
solver (a:b:c:[]) = if (a==b)&&(b==c) then 1 else (if (a/=b)&&(b/=c)&&(a/=c) then 3 else 2)