S = input() NUM = ['0','1','2','3','4','5','6','7','8','9'] ANS = 0 for i in range(len(S)): if S[i] in NUM: ANS += int(S[i]) print(ANS)