#!/usr/bin/env python3
import sys
try:
    from math import gcd
except Exception:
    from fraction import gcd


def solve(S: str):
    return sum([int('{}1'.format(s)) for s in S])


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    result = solve(S)
    print(result)

if __name__ == '__main__':
    main()
