#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7, INF = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long qpow(long long a, long long n) {
  long long r = 1 % P;
  for (a %= P; n; a = a * a % P, n >>= 1)
    if (n & 1) r = r * a % P;
  return r;
}
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
long long pre[maxn], pree[maxn], suf[maxn], suff[maxn];
char a[maxn];
int main() {
  cin >> a + 1;
  int n = strlen(a + 1);
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    pre[i] = pre[i - 1] * 10 + a[i] - '0';
    pre[i] %= mod;
    if (i != n) ans += pre[i];
    ans %= mod;
    pree[i] = pree[i - 1] + pre[i];
    pree[i] %= mod;
  }
  long long cnt = 1;
  for (int i = n; i >= 1; i--) {
    suf[i] = suf[i + 1] + cnt * (a[i] - '0');
    suf[i] %= mod;
    if (i != 1) ans += suf[i];
    ans %= mod;
    suff[i] = suff[i + 1] + suf[i];
    suff[i] %= mod;
    cnt *= 10;
    cnt %= mod;
  }
  cnt = 10;
  int num = 1;
  for (int i = n - 2; i >= 1; i--) {
    ans += pre[i] * cnt + suff[i + 2];
    ans %= mod;
    num++;
    cnt += qpow(10, num);
    cnt %= mod;
  }
  cout << ans << endl;
}
