MOD = 998244353 S = input(); N = len(S) ans = 0 for i in range(N): ans = (ans * 11 + (ord(S[i]) - ord('0')) * pow(2, i, MOD)) % MOD print(ans)