#include #include using namespace std; #define rep(i, a, b) for(int i=a; i=b; i--) using mint = atcoder::modint998244353; int main() { // ios::sync_with_stdio(false); // std::cin.tie(nullptr); // cout << fixed << setprecision(18); string s; cin>>s; int n = s.size(); vector>>> dp(n+1, vector>>(1<<10, vector>(2, vector(2)))); dp[n][0][1][1] = 1; rrep(i,n,1){ int now = s[n-i]-'0'; rep(j,0,1<<10){ rep(mode,0,2){ rep(l,0,2){ if (mode){ rep(k,0,10){ if (l){ if (k