function main(input) {
    const s = input
    let res = 0

    for (let i = 0; i < s.length; i++) {
        if (s[i] == '1') {
            res++
        }
        
    }
    console.log(res)
}

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