S = 0 for s in input(): S += [int(s), 10][s == '0'] print(S)