#include <bits/stdc++.h>
using namespace std;
int p[100010], q[100010], nxt[100010];
char s[100010];
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = (long long)a * a % m)
    if (b & 1) ans = (long long)ans * a % m;
  return ans;
}
int inv(int a) {
  return a <= 1 ? a
                : (int)(1000000007 - (long long)1000000007 / a *
                                         inv(1000000007 % a) % 1000000007);
}
pair<int, int> operator+(const pair<int, int> &a, const pair<int, int> &b) {
  int first =
      ((long long)a.first * power(10, b.second, 1000000007) % 1000000007 +
       b.first) %
      1000000007;
  int second = (a.second + b.second) % (1000000007 - 1);
  return pair<int, int>(first, second);
}
pair<int, int> calc_minus(int a, int b, int alen, int blen, int n) {
  int A = p[n], ra1 = inv(A - 1);
  int d = power(A, (1000000007 + blen - alen) % (1000000007 - 1), 1000000007);
  int c = (long long)ra1 * ra1 % 1000000007 * (d - A) % 1000000007;
  c = (c + (long long)d * a % 1000000007 * ra1) % 1000000007;
  c = ((c - (long long)b * ra1) % 1000000007 + 1000000007) % 1000000007;
  d = (long long)(blen - alen + 1) * n % (1000000007 - 1) + 1000000007 - 1;
  return pair<int, int>(c, d % (1000000007 - 1));
}
pair<int, int> calc(int st, int ed) {
  assert(st < ed);
  for (int i = st; i < ed; i++) {
    if (s[i] == '(') {
      i = nxt[i];
      continue;
    }
    if (s[i] == '+') return calc(st, i) + calc(i + 1, ed);
  }
  if (s[ed - 1] == ')') {
    int mid = 0, tmp = 0;
    for (int i = st; i < ed; i++) {
      if (s[i] == '(') {
        pair<int, int> a = calc(i + 1, ed - 1);
        int b = power(10, a.second, 1000000007);
        int ansx;
        if (b == 1) {
          ansx = (long long)a.first * tmp % 1000000007;
        } else {
          int c = (long long)(power(b, mid, 1000000007) - 1) * inv(b - 1) %
                  1000000007;
          ansx = (long long)a.first * c % 1000000007;
        }
        int ansy = (long long)mid * a.second % (1000000007 - 1);
        return pair<int, int>((1000000007 + ansx) % 1000000007, ansy);
      }
      mid = (mid * 10LL + s[i] - '0') % (1000000007 - 1);
      tmp = (tmp * 10LL + s[i] - '0') % 1000000007;
    }
    assert(0);
  }
  int a = 0, alen = 0;
  for (int i = st; i < ed; i++) {
    if (s[i] == '-') {
      int la = i - st, lb = ed - i - 1, b = 0, blen = 0;
      for (i++; i < ed; i++) {
        b = (b * 10LL + s[i] - '0') % 1000000007;
        blen = (blen * 10LL + s[i] - '0') % (1000000007 - 1);
      }
      if (la == lb) return calc_minus(a, b, alen, blen, la);
      pair<int, int> A =
          calc_minus(a, (1000000007 - 1 + p[la]) % 1000000007, alen,
                     (1000000007 - 2 + q[la]) % (1000000007 - 1), la);
      for (i = la + 1; i < lb; i++)
        A = A + calc_minus(p[i - 1], (p[i] + 1000000007 - 1) % 1000000007,
                           q[i - 1], (q[i] + 1000000007 - 2) % (1000000007 - 1),
                           i);
      A = A + calc_minus(p[lb - 1], b, q[lb - 1], blen, lb);
      return A;
    }
    a = (a * 10LL + s[i] - '0') % 1000000007;
    alen = (alen * 10LL + s[i] - '0') % (1000000007 - 1);
  }
  return pair<int, int>(a, ed - st);
}
int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int i = p[0] = 1; i < 100010; i++) p[i] = p[i - 1] * 10LL % 1000000007;
  for (int i = q[0] = 1; i < 100010; i++)
    q[i] = q[i - 1] * 10LL % (1000000007 - 1);
  stack<int> st;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') st.push(i);
    if (s[i] == ')') nxt[st.top()] = i, st.pop();
  }
  printf("%d\n", calc(0, n).first);
  return 0;
}
