S = input() ans = 0 for s in S: if s == "0": s = "10" ans += int(s) else: ans += int(s) print(ans)