s = input() ans = 0 for num in s: ans += int(num) print(ans)