process.stdin.resume();
process.stdin.setEncoding('utf8');
// Your code here!

function main(input) {
    var ans = 0;
    var arg = input.split('');
    for(var i = 0, l = arg.length; i < l; i++){
        if(arg[0] == '1') {ans++;}
    }
    
    console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));