#include using namespace std; int power(int a,int b,int c){ long long table=a; long long answer=1; while(b>0){ if(b%2){ answer=(answer*table)%c; } b/=2; table=(table*table)%c; } return (int)answer; } int main(){ string S; cin>>S; int N=S.size(); long long answer=0; int mod=998244353; long long coeff=power(2,N-1,mod); for(int i=N-1;i>=0;--i){ answer+=(int)(S[i]-'0')*coeff; answer%=mod; coeff=(coeff*11)%mod; coeff=(coeff*(mod+1)/2)%mod; } cout<