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