# -*- coding: utf-8 -*- S = input() def to_int(c): try: return int(c) except: return 0 ans = 0 for c in S: ans += to_int(c) print(ans)