mod = 998244353 s = list(input()) n = len(s) s = [int(i) for i in s] dp = [0] * (n + 1) for i in range(n): dp[i + 1] = (11 * dp[i] + pow(2, i, mod) * s[i]) % mod print(dp[-1])