#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const long long mod = 1e9 + 7;
int n;
char s[N];
long long pre[N];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) pre[i] = (pre[i - 1] * 10 + s[i] - '0') % mod;
  for (int i = 1; i <= n; i++) pre[i] = (pre[i] + pre[i - 1]) % mod;
  long long ans = 0, tmp = 0, base = 1;
  for (int i = n; i >= 1; i--) {
    ans += pre[i - 1] * base % mod + 1LL * i * tmp % mod;
    tmp = (tmp + base * (s[i] - '0') % mod) % mod;
    base = base * 10 % mod;
    ans %= mod;
  }
  printf("%lld\n", ans);
  return 0;
}
