import scala.io.StdIn
object Main{
  def main(args: Array[String]): Unit ={
    val one_or_zero: String = readLine("please write down:")
    var counter = 0
    val judge1: Unit = if (one_or_zero(0) == '1') counter = counter+1
    val judge2: Unit = if (one_or_zero(1) == '1') counter = counter+1
    val judge3: Unit = if (one_or_zero(2) == '1') counter = counter+1
    println(counter)
  }