n = str(abs(int(input())))
print(sum(int(i) for i in n))