function main(input){
    var array = input.split('')
    var counter = 0

    if(parseInt(array[0],10)==1){
        counter +=1
    }
    if(parseInt(array[1],10)==1){
        counter +=1
    }
    if(parseInt(array[2],10)==1){
        counter +=1
    }
    console.log('%d', counter)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))