S=input() size=len(S) answer=0 for i in range(0,size): K=S[i] INT=int(K) answer=answer+INT print(answer)