S = input().strip() total = 0 for c in S: total += int(c) print(total)