n = str(input()) ans = 0 for i in n: ans += int(i) print(ans)