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