N="".sprit(input()) N1=int(N[0]) N2=int(N[1]) print((N1*N2)%1000000007)