S = input() s = list(S) ans = 0 #print(s) for i in s: try: ans += int(i) except: continue print(ans)