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