object Main {
  def main(args: Array[String]): Unit = {
    val list: List[Int] = io.StdIn.readLine.split(' ').toList.map(str => str.toInt)
    val answer = list.groupBy(v => v).size

    println(answer)
  }
}
