a = list(input()) number = ["1","2","3","4","5","6","7","8","9"] result = 0 for i in range(len(a)): if a[i] in number: result += int(a[i]) print(result)