#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) const int maxn=5005; int n,dp[maxn]; string s; bool a[maxn][maxn]; signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); cin >> s; n=s.size(); for(int i=0; i<=2*n-2; ++i){ int l=i/2,r=i-l; while(l>=0&&r