#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
char s[maxn];
long long ten[maxn], tmp[maxn];
void init() {
  ten[0] = 1;
  for (int i = 1; i < maxn; i++) {
    ten[i] = (ten[i - 1] * 10) % mod;
    tmp[i] = (tmp[i - 1] + ((long long)i * ten[i - 1]) % mod) % mod;
  }
}
int main() {
  init();
  gets(s + 1);
  long long l = strlen(s + 1);
  long long ans = 0;
  for (long long i = 1; i <= l; i++) {
    long long d = s[i] - '0';
    ans =
        (ans + ((d * ((i * (i - 1LL) / 2LL) % mod)) % mod * ten[l - i]) % mod) %
        mod;
    ans = (ans + (d * tmp[l - i]) % mod) % mod;
  }
  printf("%lld\n", ans);
  return 0;
}
