#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; const double PI=acos(-1); ll mod_pow(ll x,ll y,ll mod){ ll res=1; while(y>0){ if(y&1){ res*=x; res%=mod; } x*=x; x%=mod; y/=2; } return res; } int main(){ string S; cin>>S; int n=S.size(); vector> dp(n+1,vector(4,0)); dp[0][0]=1; for(int i=0;i