s = input() sList = list(s) total = 0 for a in sList: c = ord(a) if c > 47 and c < 58: n = int(c) - 48 total = total + n print(total)