s,t=input().split() M=10**9+9 L=202 s=s.zfill(L) t=t.zfill(L) q=[[[0]*(L*20+1) for j in range(2)] for i in range(2)] q[0][0][0]=1 for p in range(L): c1=int(s[p]) c2=int(t[p]) nq=[[[0]*(L*20+1) for j in range(2)] for i in range(2)] for d in range(-L*10,L*10+1): for q1 in range(10): for q2 in range(10): if q[0][0][d]!=0: if q1<=c1 and q2<=c2: nq[q1