S = list(input()) total = 0 for x in S: total += int(x) print(total)