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