#define MD 998244353 Mint@n,a,b,c,z;string@s;for(ll d:s){++a;rep(d)(a,b,c)=(b,c,a);(a,b,c)+=d/63*3*(a+b+c);z+=a;}wt(z);