function main(input) {
    const args = input.split('')
    let cnt = 0
    args.forEach(a => {
      if(a === 1) cnt + 1
    })
                 console.log(cnt);
}
 
main(require('fs').readFileSync('/dev/stdin', 'utf8'));