#include using namespace std; int dp[1001][1001]; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string s; int res = 0; cin >> s; int n = s.length(); memset(dp,-1,sizeof(dp)); for(int i=0;i= n) break; if(dp[l][r]==-1) continue; if(l-1>=0 && r+1