A = input() B = list(A) C = 0 for x in B: C = C + int(x) print(C)