import sys sys.setrecursionlimit(10 ** 6) stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() nsa = lambda: list(stdin.readline().split()) mod = 10 * 7 + 7 S = ns() num = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} ans = 0 for s in S: if s in num: ans += int(s) print(ans)