n = input()  
total = 0
for digit in n:
    total += int(digit)
print(total)