s = input() print(sum(ord(c) - ord('0') + (10 if c == '0' else 0) for c in s))