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