S=input() a=[] b=list(map(str,[0,1,2,3,4,5,6,7,8,9])) for i in list(S): if (i in b)==True: a.append(i) a=list(map(int,a)) print(sum(a))