data = input() number = "0123456789" answer = 0 for i in data: for j in number: if i == j: answer += int(i) print(answer)