str=input () sum=0 for i in str : sum+=int(i) print (sum)