S = input() ans = 0 for c in S: ans += int(c) print(ans)