line = input() sum_num = 0 for x in line: sum_num += int(x) print(sum_num)