// #pragma GCC optimize ("O3") // #pragma GCC target("avx512f") // #pragma GCC optimize("unroll-loops") // #ifndef ONLINE_JUDGE // #define _GLIBCXX_DEBUG // #endif #include #include using namespace std; using namespace atcoder; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define bit(n,k) (((ll)n>>(ll)k)&1) /*nのk bit目*/ #define pb push_back #define pf push_front #define fi first #define se second #define eb emplace_back #define endl '\n' #define SZ(x) ((ll)(x).size()) #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define debug(v) cout<<#v<<":";for(auto x:v){cout< Point; // Point typedef long long ll; typedef vector vl; typedef vectorvvl; typedef vectorvvvl; typedef vectorvvvvl; typedef vectorvvvvvl; typedef pair P; typedef tuple T; template using minpq=priority_queue,greater>; const ll MOD=1000000007LL; // const ll MOD=998244353LL; using mint=modint998244353; // using mint=modint1000000007; // using mint=modint; const ll mod=MOD; string abc="abcdefghijklmnopqrstuvwxyz"; string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; vl dx={0,0,1,-1,1,1,-1,-1}; vl dy={1,-1,0,0,-1,1,-1,1}; template vector make_vec(size_t a) { return vector(a); } template auto make_vec(size_t a, Ts... ts) { return vector(ts...))>(a, make_vec(ts...)); } templatebool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(bvm; typedef vectorvvm; typedef vectorvvvm; ll modpow(ll a, ll n,ll mod=MOD) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } vectordivisor(int n){ vectorres; for(int i=1;i*i<=n;i++){ if(n%i==0){ res.push_back(i); if(i != n/i) res.push_back(n/i); } } return res; } //素因数分解O(√n) mapprime_factor(ll n){ mapres; for(ll i=2;i*i<=n;i++){ while(n%i==0){ res[i]++; n/=i; } } if(n!=1)res[n]=1; return res; } struct edge{ ll to;ll cost; }; ll functional(int x){ if(x==0)return 1; else return x*functional(x-1); } ll exp(int n,int r){ if(r==0)return 1; return n*exp(n,r-1); } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); cout << fixed << setprecision(12); /*--------------------------------*/ string s;cin>>s; mint ans=0; vm pow2(s.size()); vm pow11(s.size()); pow2[0]=pow11[0]=1; rep(i,(ll)s.size()-1)pow2[i+1]=pow2[i]*2,pow11[i+1]=pow11[i]*11; rep(i,s.size()){ ans+=(mint)(s[s.size()-i-1]-'0')*pow11[i]*pow2[s.size()-i-1]; } cout<