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