#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>>; #define MAX 100 #define MOD 998244353 #define INF 1000000000 ll modpow(ll a,ll n){ a%=MOD; ll ret=1; while(n>0){ if((n&1)==1){ ret=ret*a%MOD; } n>>=1; a=a*a%MOD; } return ret; } int main(){ string S; cin>>S; int N=S.size(); ll ans=0; for(int i=0;i