"use strict"

function main(input) {
    input = input.split('\n')[0].split('')
    input = input.map(x => Number(x + 1))
    var ans = input.reduce((x, y) => x + y)
    console.log(ans)

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