#include using namespace std; using ll=long long; #include using mint=atcoder::modint998244353; int main(){ string s; cin>>s; int n=s.size(); vector crt(4); crt[0]=1; for(int i=0;i nxt(4); int d=s[i]-'0'; for(int j=0;j<10;j++){ for(int k=0;k<4;k++){ if((k&2)==0&&d