N = input() ans = sum([int(s) for s in N]) print(ans)