import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().rstrip() answer = sum(int(x) - ord('0') for x in S) answer += 10 * S.count(b'0') print(answer)