s = input() sum = 0 for num in range(len(s)): if int(s[num]) != 0: sum = sum + int(s[num]) else: sum = sum + 10 print(sum)