object Main extends App {
    val sc = new java.util.Scanner(System.in)
    val line = sc.nextLine()
    val ret = (for {
      x <- line.toCharArray() if x == '1'
    } yield {
      x
    }).length
    println(ret)
}
