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