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