fun main(args: Array<String>) {
    var counter = 0
    val s: String = readLine()!!
    if (s[0] == '1') counter++
    if (s[1] == '1') counter++
    if (s[2] == '1') counter++
    println(counter)
}