#include <bits/stdc++.h>
using namespace std;
long long prefix[100010];
long long sufix[100010];
long long f[100010];
long long fastexpo(long long n, long long exp) {
  if (exp == 0) return 1;
  if (exp == 1) return n % 1000000007;
  long long ans = fastexpo(n, exp / 2);
  ans = (ans * ans) % 1000000007;
  if (exp % 2 != 0) return (ans * n) % 1000000007;
  return ans;
}
int main() {
  string s;
  cin >> s;
  long long n = s.length();
  for (long long i = 1; i <= n; i++) {
    prefix[i] =
        ((long long)(s[i - 1] - '0') + ((prefix[i - 1] * 10) % 1000000007)) %
        1000000007;
  }
  for (long long i = n; i >= 1; i--) {
    sufix[i] =
        ((((long long)(s[i - 1] - '0') * fastexpo(10, n - i)) % 1000000007) +
         sufix[i + 1]) %
        1000000007;
  }
  for (long long i = 1; i <= n; i++) {
    f[i] = (prefix[i] + f[i - 1]) % 1000000007;
  }
  long long ans = 0;
  for (long long r = 1; r <= n; r++) {
    ans = (((f[r - 1] * fastexpo(10, n - r)) % 1000000007 +
            (sufix[r + 1] * r) % 1000000007) %
               1000000007 +
           ans) %
          1000000007;
  }
  cout << ans << endl;
  return 0;
}
