const main = function(arg) {
    var input = arg.trim().split("");
    var count = 0
    for(num of input){
        if(num ==='1'){
            count++
        }
    }
    console.log(count)
}
main(require('fs').readFileSync('/dev/stdin','utf8'));