function main(input) {
    var result = 0;
    const args = input.split("");
    const len = args.length;
    for (i = 0; i < len; i++) {
        if (args[i] == 1) {
            var result = result+1;
        }
    }
    console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));