from functools import reduce
import sys

number = input()

result = reduce(lambda x, y: x + y, map(int, number))
print(result)