function main(input) {
    const arry = input.split("");
    var count1 = 0;
    
    arry.forEach( num => {
      if(num === "1") {
        count1++;
      }
    })
    console.log(count1);
}

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