mod = 10 ** 9 + 7 exp2 = [1] exp11 = [1] for _ in range(200000): exp2.append(exp2[-1] * 2 % mod) exp11.append(exp11[-1] * 11 % mod) s = input() n = len(s) ans = 0 for i in range(n): ans += exp2[i] * exp11[n - i - 1] * int(s[i]) ans %= mod print(ans)