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