s = input() s_list = list(s) l = len(s_list) souwa = 0 for i in range(l): if s_list[i].isdigit(): souwa += int(s_list[i]) print(souwa)