def solve(): mod = 10**9+7 p, k = map(int, input().split()) ans = (pow(10,p,mod)+p-k-1)*pow(p,mod-2,mod)%mod return ans print(solve())