S = input() ans = 0 for i in range(1, 10): ans += i * S.count(str(i)) ans += 10 * S.count("0") print(ans)