S = list(input()) print(sum([i * S.count(str(i)) for i in range(10)]))