#coding: utf-8 ##yuki_289 s=[] s=raw_input() res=0 for i in xrange(len(s)): x=ord(s[i]) if x>48 and x<=57: res+=x-48 print res