n = input().strip()
s = 0
for i in n:
    i = int(i)
    s = s + i
print(s)