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