#include using namespace std; //* ATCODER #include using namespace atcoder; typedef modint998244353 mint; //*/ /* BOOST MULTIPRECISION #include using namespace boost::multiprecision; //*/ typedef long long ll; #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) template bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template T max(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmax(ret, a[i]); return ret; } template T min(vector &a){ assert(!a.empty()); T ret = a[0]; for (int i=0; i<(int)a.size(); i++) chmin(ret, a[i]); return ret; } template T sum(vector &a){ T ret = 0; for (int i=0; i<(int)a.size(); i++) ret += a[i]; return ret; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); string n; cin >> n; vector a; rep(i,0,(int)n.size()) { a.push_back(n[i] - '0'); } vector dp(2, vector(100)); int now1 = 0; int now2 = 0; rep(num,0,(int)n.size()) { vector ndp(2, vector(100)); rep(i,0,100){ rep(j,0,10){ if (i==40 && j==4) { ndp[1][(i%10)*10+j] += dp[0][i]; ndp[1][(i%10)*10+j] += dp[1][i]; }else{ ndp[0][(i%10)*10+j] += dp[0][i]; ndp[1][(i%10)*10+j] += dp[1][i]; } } } if(num > 0){ rep(j,1,10){ ndp[0][j] += 1; } } for (int i=(num<1); i