//~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
//~ #pragma GCC target ("avx2")
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set =
    tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define shandom_ruffle random_shuffle

using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
const int nax=307;
const ll mod=998244353;

int n;

char wcz[nax];
int tab[nax];

ll dp[nax][nax][nax];

ll wyn;

int moge[nax][nax][nax];

inline void dod(ll &a, ll b)
{
	if ((a+=b)>=mod)
		a-=mod;
}

void sdod(ll &a, ll b)
{
	a=(a+b)%mod;
}

int main()
{
	scanf("%s", wcz+1);
	n=strlen(wcz+1);
	for (int i=1; i<=n; i++)
		tab[i]=wcz[i]-'0';
	moge[0][0][0]=1;
	for (int i=0; i<=n; i++)
	{
		for (int j=n; j>=0; j--)
		{
			for (int l=n; l>=0; l--)
			{
				if (!moge[i][j][l])
					continue;
				//~ debug() << i << " " << j << " " << l;
				if ((j+l)>=2 && j)
					moge[i][j-1][l]=1;
				if ((j+l)>=2 && l)
					moge[i][j][l-1]=1;
				if (tab[i+1] || tab[i+2])
					moge[i+2][j][l+1]=1;
				if (!tab[i+1] || !tab[i+2])
					moge[i+2][j+1][l]=1;
				if (tab[i+1] && j)
					moge[i+1][j-1][l+1]=1;
				if (tab[i+1] && l)
					moge[i+1][j][l]=1;
				if (!tab[i+1] && l)
					moge[i+1][j+1][l-1]=1;
				if (!tab[i+1] && j)
					moge[i+1][j][l]=1;
			}
		}
	}
	dp[n+1][0][0]=1;
	for (int i=n+1; i; i--)
	{
		for (int j=0; j<=n; j++)
		{
			for (int l=0; l<=n; l++)
			{
				if (!dp[i][j][l])
					continue;
				//~ debug() << i << " " << j << " " << l << " " << dp[i][j][l];
				if (moge[i-1][j][l] || moge[i][j+(!tab[i])][l+tab[i]])
				{
					//~ debug() << "tak";
					dod(wyn, dp[i][j][l]);
					//~ continue;
				}
				//~ if (i==2 && tab[i-1] && moge[i-1][j][l+1])
					//~ dod(wyn, dp[i][j][l]);
				//~ if (i==2 && !tab[i-1] && moge[i-1][j+1][l])
					//~ dod(wyn, dp[i][j][l]);
				dod(dp[i-1][j][l], dp[i][j][l]);
				if (tab[i-1])
					dod(dp[i][j+1][l], dp[i][j][l]);
				else
					dod(dp[i][j][l+1], dp[i][j][l]);
			}
		}
	}
	wyn--;
	wyn%=mod;
	wyn+=mod;
	wyn%=mod;
	
	printf("%lld\n", wyn);
	return 0;
}


Measured memory_bytes: 251740