s = list(input()) list = list(str(i) for i in range(10)) i_list = [] for i in s: if i in list: i_list.append(int(i)) print(sum(i_list))