S = input() count = 0 for i in range(len(S)): if S[i] == "0" or S[i] == "1" or \ S[i] == "2" or S[i] == "3" or \ S[i] == "4" or S[i] == "5" or \ S[i] == "6" or S[i] == "7" or \ S[i] == "8" or S[i] == "9": count += int(S[i]) print(count)