S = raw_input() L =len(str(S)) SS = [] for i in range(0,L): if S[i] == '0': SS.append(int(10)) else: SS.append(int(S[i])) print sum(SS)