#yuki_9011 s=raw_input() l=len(s) res=0 for i in xrange(l): res+=int(s[i]) print res