seq = list(input()) num = list('1234567890') ls = [] for i in seq: if i in num: ls.append(int(i)) print(sum(ls))