lst = [int(x) for x in input()] ans = sum(lst) + lst.count(0) * 10 print(ans)