'use strict'

const main = input => {
	let cnt = 0
	if (input[0] === '1') cnt++
	if (input[1] === '1') cnt++
	if (input[2] === '1') cnt++
	console.log(cnt)
}

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