print(sum([(int(i) - 1) % 10 + 1 for i in input()]))