#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=305,mod=998244353;
int n;
char s[N];
int dp[N][N][N];
bool f[N][N][N];
int main()
{
    scanf("%s",s);
    n=strlen(s);
    f[0][0][0]=true;
    for(int i=0;i<n;i++)
        for(int n0=0;n0<=i;n0++)
        for(int n1=0;n1<=i;n1++)
    {
        if(!f[i][n0][n1]) continue;
        f[i+1][n0][n1]=true;
        if(n0&&s[i]=='1')
            f[i+1][n0-1][n1+1]=true;
        if(n1&&s[i]=='0')
            f[i+1][n0+1][n1-1]=true;
        if(i+1<n&&(s[i]=='0'||s[i+1]=='0'))
            f[i+2][n0+1][n1]=true;
        if(i+1<n&&(s[i]=='1'||s[i+1]=='1'))
            f[i+2][n0][n1+1]=true;
    }
    dp[n][0][0]=1;
    ll ans=0;
    for(int i=n;i>=0;i--)
        for(int n0=0;n0<=n;n0++)
        for(int n1=0;n1<=n;n1++)
    {
        if(dp[i][n0][n1]==0) continue;
        if(f[i][n0][n1])
            ans=(ans+dp[i][n0][n1])%mod;
        if(i>0)
        {
            dp[i-1][n0][n1]=(dp[i-1][n0][n1]+dp[i][n0][n1])%mod;
            if(s[i-1]=='1')
                dp[i][n0+1][n1]=(dp[i][n0+1][n1]+dp[i][n0][n1])%mod;
            else
                dp[i][n0][n1+1]=(dp[i][n0][n1+1]+dp[i][n0][n1])%mod;
        }
    }
    ans=(ans+mod-1)%mod;
    printf("%lld\n",ans);
}
