#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e9 + 7;
int add(int first, int second) {
  first += second;
  if (first >= Mod) return first - Mod;
  return first;
}
int mul(int first, int second) {
  return (int)((long long)first * second % Mod);
}
int sub(int first, int second) {
  first -= second;
  if (first < 0) return first + Mod;
  return first;
}
int pot(int first, int second) {
  int r = 1;
  while (second) {
    if (second & 1) r = mul(r, first);
    first = mul(first, first), second >>= 1;
  }
  return r;
}
int inv(int first) {
  assert(first != 0);
  return pot(first, Mod - 2);
}
const int Mod2 = 1e9 + 6;
int add2(int first, int second) {
  first += second;
  if (first >= Mod2) return first - Mod2;
  return first;
}
int mul2(int first, int second) {
  return (int)((long long)first * second % Mod2);
}
int sub2(int first, int second) {
  first -= second;
  if (first < 0) return first + Mod2;
  return first;
}
int pot2(int first, int second) {
  int r = 1;
  while (second) {
    if (second & 1) r = mul2(r, first);
    first = mul2(first, first), second >>= 1;
  }
  return r;
}
pair<int, int> concat(pair<int, int> a, pair<int, int> b) {
  return {add(mul(a.first, pot(10, b.second)), b.first),
          add2(a.second, b.second)};
}
pair<int, int> cast(string s) {
  pair<int, int> sol = {0, 0};
  for (auto t : s)
    sol = {add(mul(sol.first, 10), t - '0'), add2(sol.second, 1)};
  return sol;
}
pair<int, int> concatself(pair<int, int> a, int b) {
  if (b == 0) return {0, 0};
  pair<int, int> sol = a;
  for (int i = (int)(0); i < (int)(b - 1); ++i) sol = concat(sol, a);
  return sol;
}
void inc(string &s) {
  int pos = (int)s.size() - 1;
  while (s[pos] == '9') s[pos--] = '0';
  if (pos == -1)
    s.insert(s.begin(), '1');
  else
    ++s[pos];
}
pair<int, int> kojikurac4(int l) {
  int lambda = pot(10, l);
  int lo1 = pot(10, l - 1);
  int lo2 = pot2(10, l - 1);
  int hi1 = sub(pot(10, l), 1);
  int hi2 = sub2(pot2(10, l), 1);
  int explen = mul2(l, add2(1, sub2(hi2, lo2)));
  int del1 = sub(hi1, lo1);
  int del2 = sub2(hi2, lo2);
  if (lambda == 1) {
    return {sub(mul(hi1, add(del1, 1)), mul(mul(del1, add(del1, 1)), inv(2))),
            explen};
  }
  int expmod =
      mul(hi1, mul(sub(pot(lambda, add2(del2, 1)), 1), inv(sub(lambda, 1))));
  int phi = inv(sub(lambda, 1));
  phi = mul(lambda, mul(phi, phi));
  expmod =
      sub(expmod,
          sub(sub(phi, mul(phi, pot(lambda, del2))),
              mul(del1, mul(pot(lambda, add(del2, 1)), inv(sub(1, lambda))))));
  return {expmod, explen};
}
pair<int, int> kojikurac2(string &a, string &b) {
  if (a.size() == b.size()) {
    int len = (int)a.size();
    vector<int> delta(len);
    for (int i = (int)(0); i < (int)(len); ++i) delta[i] = b[i] - '0';
    for (int i = (int)(0); i < (int)(len); ++i) delta[i] -= a[i] - '0';
    for (int i = len - 1; i >= 0; --i)
      if (delta[i] < 0) delta[i] += 10, --delta[i - 1];
    int del2 = 0;
    int del1 = 0;
    for (auto t : delta)
      del2 = add2(mul2(del2, 10), t), del1 = add(mul(del1, 10), t);
    int explen = mul2(add2(del2, 1), len);
    int lambda = pot(10, len);
    int mod1 = 0;
    int mod2 = 0;
    int bb = 0;
    for (auto t : b) bb = add(mul(bb, 10), t - '0');
    if (lambda == 1)
      mod1 = mul(bb, add(del1, 1));
    else
      mod1 =
          mul(bb, mul(sub(pot(lambda, add2(del2, 1)), 1), inv(sub(lambda, 1))));
    if (lambda == 1)
      mod2 = mul(mul(del1, add(del1, 1)), inv(2));
    else {
      int tmp = inv(sub(1, lambda));
      tmp = mul(mul(tmp, lambda), tmp);
      mod2 =
          sub(sub(tmp, mul(tmp, pot(lambda, add2(0, del2)))),
              mul(del1, mul(pot(lambda, add2(del2, 1)), inv(sub(1, lambda)))));
    }
    int expmod = sub(mod1, mod2);
    return {expmod, explen};
  } else {
    string bla(a.size(), '9');
    pair<int, int> sol = kojikurac2(a, bla);
    int len = (int)a.size() + 1;
    while (len < (int)b.size()) {
      sol = concat(sol, kojikurac4(len));
      ++len;
    }
    bla = '1' + string(b.size() - 1, '0');
    return concat(sol, kojikurac2(bla, b));
  }
}
pair<int, int> kojikurac(string &a, string &b) {
  return kojikurac2(a, b);
  pair<int, int> sol = cast(a);
  while (a != b) {
    inc(a);
    sol = concat(sol, cast(a));
  }
  return sol;
}
string s;
int pos = 0;
string number() {
  string sol;
  while (s[pos] >= '0' && s[pos] <= '9') sol.push_back(s[pos++]);
  return sol;
}
pair<int, int> expression();
pair<int, int> term() {
  string tmp = number();
  if (s[pos] == '-') {
    ++pos;
    string tmp2 = number();
    return kojikurac(tmp, tmp2);
  } else if (s[pos] == '(') {
    ++pos;
    pair<int, int> tmp2 = expression();
    ++pos;
    pair<int, int> sol = {0, 0};
    for (auto t : tmp) {
      sol = concat(concatself(sol, 10), concatself(tmp2, t - '0'));
    }
    return sol;
  } else {
    return cast(tmp);
  }
}
pair<int, int> expression() {
  pair<int, int> sol = {0, 0};
  while (true) {
    sol = concat(sol, term());
    if (s[pos] != '+') break;
    ++pos;
  }
  return sol;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> s;
  s.push_back('#');
  pair<int, int> sol = expression();
  cout << sol.first << endl;
  return 0;
}
