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