function main(input) {
    input = input.split('')
    input = input.map(x => Number(x + 1))
    let ans = input.reduce((x, y) => x + y)
    console.log(ans)


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