import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) a = list(map(int, input())) n = len(a) M = 998244353 ans = 0 for i in range(n): v = a[n-1-i] ans += v * pow(2, n-1-i, M) * pow(11, i, M) % M ans %= M print(ans%M)