import sys

n = abs(int(input()))
c = 0
for i in str(n):
    c += int(i) 
print(c)