s = list(input()) l = len(s) a = 0 for i in range(l): t = s[i] if ord(t)>47 and ord(t)<58: a += int(t) print(a)