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