D = input() s = 0 for d in D: try: s += int(d) except ValueError: pass print(s)