#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
long long qpow(long long x, long long n) {
  x %= mod;
  if (x == 1) return 1;
  long long ans = 1;
  while (n) {
    if (n % 2 == 1) ans = (ans * x) % mod;
    x = x * x % mod;
    n /= 2;
  }
  return ans % mod;
}
char s[N];
long long a[N], b[N];
long long sum[N];
void init(int n) {
  long long base = 0;
  a[0] = b[n + 1] = 0;
  for (int i = 1; i <= n; i++)
    a[i] = ((a[i - 1] * 10LL) + 1LL * (s[i] - '0')) % mod;
  for (int i = n; i >= 1; i--)
    b[i] = (b[i + 1] + 1LL * (s[i] - '0') * qpow(10LL, base++) % mod) % mod;
  for (int i = 1; i <= n; i++) sum[i] = (sum[i - 1] + a[i]) % mod;
}
signed main() {
  int T = 1;
  while (T--) {
    scanf("%s", s + 1);
    int n = strlen(s + 1);
    init(n);
    long long ans = 0;
    for (int j = 1; j <= n; j++) {
      long long Rlen = n - j;
      ans = (ans + sum[j - 1] * qpow(10LL, Rlen) + 1LL * b[j + 1] * j % mod) %
            mod;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
