aaa = raw_input() ans = 0 for i in range(0, len(aaa)): if ord("0") <= ord(aaa[i]) <= ord("9"): ans = ans + int(aaa[i]) print ans