S = list(input()) mod = 998244353 S = [int(i) for i in S] N = len(S) ans = 0 r = 2*pow(11,-1,mod) r %= mod tS = pow(11,N-1,mod) for i in range(N): ans += tS*S[i] ans %= mod tS *= r tS %= mod print(ans)