s=input() num=0 for i in range(len(s)): num+=int(s[i]) print(num)