#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")

char*mmap();
#define rd_skip() while(*rp++>=48)
#define rd(v) long v=0;{long _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;}
#define wt(v) {long _z=v;do*--wp=_z%10+48;while(_z/=10);}

long f1(char*rp){
	long a00=0;
	long a01=0;
	long a10=1;
	long a11=0;
	for(long c;c=*rp++-'a',c>=0;){
		long b00=a00*25;
		long b01=a00+a01*25;
		if(c==0){
			a11=a10;
			a10=0;
		}else{
			b00+=a10*(c-1);
			b01+=a10+a11*(c-1);
		}
		a00=b00%998244353;
		a01=b01%998244353;
	}
	return a01;
}

void f2(long z){
	char wbuf[64],*wp=wbuf+sizeof wbuf;
	wt(z);
	write(1,wp,wbuf+sizeof wbuf-wp);
	_exit(0);
}

main(){
	char*rp=mmap(0l,1l<<25,1,2,0,0ll);
	rd_skip();
	f2(f1(rp));
}