n=raw_input() L=list(n) s=0 for a in L: if (ord('0') <= ord(a) <= ord('9')): s+=int(a) print s