#include using namespace std; typedef long long ll; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define FORR(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--) #define CHMIN(a,b) (a)=min((a),(b)) #define CHMAX(a,b) (a)=max((a),(b)) // const ll B = 10007; const ll B = 10007; const ll MOD = 1000000009; int bpow[252521]; int n; char s[252521]; char rs[252521]; int hsh[252521], rhsh[252521]; int rhash(int *h, int l, int r){ // s[l,...,r-1] return (h[r] - (ll)h[l]*bpow[r-l]%MOD + MOD) % MOD; } int main(){ scanf("%s",s); n = strlen(s); REP(i,n)rs[n-1-i] = s[i]; REP(i,n)hsh[i+1] = ((ll)hsh[i]*B + s[i]) % MOD; REP(i,n)rhsh[i+1] = ((ll)rhsh[i]*B + rs[i]) % MOD; bpow[0] = 1; FOR(i,1,252521)bpow[i] = (ll)bpow[i-1]*B%MOD; int ans = 1; // center character is s[i] REP(i,n){ // no remove int low = 0, high = min(i, n-1-i)+1; while(low+1 0){ int l = i-clen-1; int r = i+clen; int low = 0, high = min(l, n-1-r)+1; while(low+1 0){ int l = i-clen-1; int r = i+1+clen; int low = 0, high = min(l, n-1-r)+1; while(low+1