x=input() z=0 for i in x: y=int(i) z=z+y print(z)