S=input() ans=0 for s in S: ans+=int(s) print(ans)