#include <bits/stdc++.h>
using namespace std;
#define iinf 2000000000
#define linf 1000000000000000000LL
#define ulinf 10000000000000000000ull
#define MOD1 1000000007LL
#define mpr make_pair
typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned long UL;
typedef unsigned short US;
typedef pair < int , int > pii;
clock_t __stt;
inline void TStart(){__stt=clock();}
inline void TReport(){printf("\nTaken Time : %.3lf sec\n",(double)(clock()-__stt)/CLOCKS_PER_SEC);}
template < typename T > T MIN(T a,T b){return a<b?a:b;}
template < typename T > T MAX(T a,T b){return a>b?a:b;}
template < typename T > T ABS(T a){return a>0?a:(-a);}
template < typename T > void UMIN(T &a,T b){if(b<a) a=b;}
template < typename T > void UMAX(T &a,T b){if(b>a) a=b;}
int n,ln[100005],st[100005],ed[100005],cnt,sum[2][100005];
vector < int > dp[100005][2];
char s[100005];
int main(){
    // inputting start
    // 数据结构记得初始化！ n，m别写反！
    int i,j,k;
	scanf("%s",s);
	n=strlen(s);
    #ifdef LOCAL
        TStart();
    #endif
    // calculation start
    // 数据结构记得初始化！ n，m别写反！
    cnt=1;
    ln[0]=1;
    st[0]=ed[0]=(s[0]-'a');
	for(i=1;i<n;++i){
    	if(s[i]==s[i-1]){
    		ln[cnt]=1;
    		st[cnt]=ed[cnt]=(s[i]-'a');
    		++cnt;
    	}
    	else{
    		++ln[cnt-1];
    		ed[cnt-1]=(s[i]-'a');
    	}
    }
    // initialize for the first block
    dp[0][0].resize(ln[0]+1,0);
	dp[0][1].resize(ln[0]+1,0);
	for(i=1;i<=ln[0];++i){
		dp[0][(i&1)^(int)(s[0]-'a')][i]=1;
	}
	for(i=0;i<2;++i){
		for(j=1+(int)(s[0]==('a'+i));j<=ln[0]+1;j+=2){
			sum[i][j]=(j>=2?sum[i][j-2]:0)+dp[0][i][j];
		}
	}
    for(i=1;i<cnt;++i){
    	// DP transfer
		dp[i][0].resize(ln[i]+1);
		dp[i][1].resize(ln[i]+1);
		// transfer from larger part
		for(j=1;j<=ln[i];++j){
			// j: t
			// ln-j: length in current block
			// 
			int cur=(LL)dp[i-1][s[st[i]]-'a'][]
		}
    }
    #ifdef LOCAL
        TReport();
    #endif
    return 0;
}
