S=input() ans=0 for i in range(len(S)): if S[i]=="1": ans+=1 elif S[i]=="2": ans+=2 elif S[i]=="3": ans+=3 elif S[i]=="4": ans+=4 elif S[i]=="5": ans+=5 elif S[i]=="6": ans+=6 elif S[i]=="7": ans+=7 elif S[i]=="8": ans+=8 elif S[i]=="9": ans+=9 print(ans)