#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
long long MOD = pow(10, 9) + 7;
double eps = 1e-12;
long long myceil(long long a, long long b) {
  if (a % b == 0)
    return a / b;
  else
    return a / b + 1;
}
bool isPerSquare(long double a) {
  if (a < 0) return false;
  long long sr = sqrt(a);
  return (sr * sr == a);
}
long long arr1[200002];
long long arr2[200002];
const long long MAX = 200001;
void solve() {
  long long n, m, a, b, c, d;
  string s;
  cin >> s;
  long long temp = 1;
  arr1[0] = 0;
  for (long long i = 1; i < MAX; i++) {
    arr2[i - 1] = temp;
    arr1[i] = (arr1[i - 1] + i * temp) % MOD;
    temp = (temp * 10) % MOD;
  }
  long long ansposs = 0;
  for (long long i = 0; i < s.length(); i++) {
    long long val1 = (i * (i + 1)) / 2;
    val1 = ((s[i] - '0') * val1) % MOD;
    val1 = (val1 * arr2[s.length() - i - 1]) % MOD;
    long long val2 = ((s[i] - '0') * arr1[s.length() - i - 1]) % MOD;
    ansposs = (ansposs + val1 + val2) % MOD;
  }
  cout << ansposs << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  for (int it = 1; it <= t; it++) {
    solve();
  }
  return 0;
}
