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