s=input() print(sum(ord(s[i])-ord('0') for i in range(9))+s.count('0')*10)