MOD = 998244353 S = input() N = len(S) Ans = 0 for i in range(N): Ans += int(S[i]) * pow(11, N - 1 - i, MOD) * pow(2, i, MOD) Ans %= MOD print(Ans)