s = input() s = [int(x) for x in s] print(sum(s))