#include <bits/stdc++.h>
long long front[100010];
long long sum[100010];
int main(void) {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie();
  std::string input;
  std::cin >> input;
  long long tmp = 1;
  front[0] = 1;
  for (int i = 1; i <= input.size(); i++) {
    tmp = (tmp * 10) % 1000000007;
    front[i] = (front[i - 1] + tmp) % 1000000007;
  }
  long long cur = 0, index = 1;
  for (int i = input.size() - 1; i >= 0; i--) {
    cur = (cur + (input[i] - '0') * index % 1000000007) % 1000000007;
    sum[i] = (sum[i + 1] + cur) % 1000000007;
    index = (index * 10) % 1000000007;
  }
  long long result = 0;
  cur = 0;
  for (int i = 0; i < input.size(); i++) {
    result = (result + sum[i + 1]) % 1000000007;
    result = (result + (cur * front[input.size() - 1 - i]) % 1000000007) %
             1000000007;
    cur = (cur * 10 + input[i] - '0') % 1000000007;
  }
  std::cout << result;
}
