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