s = input() s_list = list(s) print(s_list) total = 0 for i in range(len(s_list)): total += int(s_list[i]) print(total)