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