ipt = int(input()) S = [] while ipt > 0: if ipt % 10 == 0: S.append(10) else: S.append(ipt % 10) ipt //= 10 print(sum(S))