R=range S=input() L=len(S) p=1024 D=[[0]*p for l in R(L)] D[0][0]=1 P=998244353 for l in R(1,L): for s in R(p): for d in R(10):t=s^1<