object Main {

  import java.util.Scanner
  import java.lang.String

  def main(args: Array[String]): Unit = {
    val scanner = new Scanner(System.in)
    val str :String = scanner.next()

    var count : Int = 0
    if(str.charAt(0) == '1')
      count += 1;
    if(str.charAt(1) == '1')
      count += 1;
    if(str.charAt(2) == '1')
      count += 1;
    println(count)
  }
}
