    import scala.io.StdIn.readLine
     
    //ABC081A
     
    object Main extends App {
     
      val nums = readLine()
      val ans: Int = nums.split("").toSeq.map(v => v.toInt).count(_ == 1)
      println(ans)
     
    }