import sys try: import mydebug def dprint(*objects): print(*objects) except: def dprint(*objects, sep='', end='\n'): pass # d, p = [int(x) for x in input().split()] # n = int(input()) s = input() ans = 0 for i in range(len(s)): try: num = int(s[i]) ans += num except: pass print(ans)