aaa = raw_input() bbb = [] for i in range(len(aaa)): if ord("0") <= ord(aaa[i]) <= ord("9"): bbb.append(int(aaa[i])) sum = 0 for i in range(len(bbb)): sum = sum + bbb[i] print sum