S = input() total = 0 for i in range(len(S)): if("1" <= S[i] <= "9"): s=int(S[i]) total +=s else: continue print(total)