Koa the Koala has a binary string s of length n. Koa can perform no more than n-1 (possibly zero) operations of the following form:

In one operation Koa selects positions i and i+1 for some i with 1 ≤ i < |s| and sets s_i to max(s_i, s_{i+1}). Then Koa deletes position i+1 from s (after the removal, the remaining parts are concatenated).

Note that after every operation the length of s decreases by 1.

How many different binary strings can Koa obtain by doing no more than n-1 (possibly zero) operations modulo 10^9+7 (1000000007)?

Input

The only line of input contains binary string s (1 ≤ |s| ≤ 10^6). For all i (1 ≤ i ≤ |s|) s_i = 0 or s_i = 1.

Output

On a single line print the answer to the problem modulo 10^9+7 (1000000007).

Examples

Input


000


Output


3


Input


0101


Output


6


Input


0001111


Output


16


Input


00101100011100


Output


477

Note

In the first sample Koa can obtain binary strings: 0, 00 and 000.

In the second sample Koa can obtain binary strings: 1, 01, 11, 011, 101 and 0101. For example:

  * to obtain 01 from 0101 Koa can operate as follows: 0101 → 0(10)1 → 011 → 0(11) → 01. 
  * to obtain 11 from 0101 Koa can operate as follows: 0101 → (01)01 → 101 → 1(01) → 11. 



Parentheses denote the two positions Koa selected in each operation.
#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool vmin(T& a, T b) {
  return (a > b) ? (a = b, true) : (false);
}
template <typename T>
bool vmax(T& a, T b) {
  return (a < b) ? (a = b, true) : (false);
}
template <typename T>
T smax(T x) {
  return x;
}
template <typename T, typename... K>
T smax(T a, const K&... args) {
  return max(a, smax(args...));
}
template <typename T>
T smin(T x) {
  return x;
}
template <typename T, typename... K>
T smin(T a, const K&... args) {
  return min(a, smin(args...));
}
template <typename A, typename B>
ostream& operator<<(ostream& os, const pair<A, B>& z) {
  os << "(" << z.first << ", " << z.second << ')';
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& a) {
  bool isfirst = true;
  os << "{";
  for (auto z : a) {
    if (!isfirst) {
      os << ", ";
    }
    os << z;
    isfirst = false;
  }
  os << '}';
  return os;
}
const int inf = (signed)(~0u >> 2);
const long long llf = (signed long long)(~0ull >> 2);
template <typename T>
int vsize(vector<T>& x) {
  return (signed)x.size();
}
template <typename T>
int discrete(T* a, int* b, int n) {
  vector<T> v(a + 1, a + n + 1);
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  for (int i = 1; i <= n; i++)
    b[i] = lower_bound(v.begin(), v.end(), a[i]) - v.begin() + 1;
  return v.size();
}
mt19937 rng(time(NULL));
int randint(int l, int r) { return rng() % (r - l + 1) + l; }
void exgcd(int a, int b, int& x, int& y) {
  if (!b) {
    x = 1, y = 0;
  } else {
    exgcd(b, a % b, y, x);
    y -= (a / b) * x;
  }
}
int inv(int a, int n) {
  int x, y;
  exgcd(a, n, x, y);
  return (x < 0) ? (x + n) : (x);
}
const int Mod = 1e9 + 7;
template <const int Mod = ::Mod>
class Z {
 public:
  int v;
  Z() : v(0) {}
  Z(int x) : v(x) {}
  Z(long long x) : v(x % Mod) {}
  friend Z operator+(const Z& a, const Z& b) {
    int x;
    return Z(((x = a.v + b.v) >= Mod) ? (x - Mod) : (x));
  }
  friend Z operator-(const Z& a, const Z& b) {
    int x;
    return Z(((x = a.v - b.v) < 0) ? (x + Mod) : (x));
  }
  friend Z operator*(const Z& a, const Z& b) { return Z(a.v * 1ll * b.v); }
  friend Z operator~(const Z& a) { return inv(a.v, Mod); }
  friend Z operator-(const Z& a) { return Z(0) - a; }
  Z& operator+=(Z b) { return *this = *this + b; }
  Z& operator-=(Z b) { return *this = *this - b; }
  Z& operator*=(Z b) { return *this = *this * b; }
  friend bool operator==(const Z& a, const Z& b) { return a.v == b.v; }
};
Z<> qpow(Z<> a, int p) {
  Z<> rt = Z<>(1), pa = a;
  for (; p; p >>= 1, pa = pa * pa) {
    if (p & 1) {
      rt = rt * pa;
    }
  }
  return rt;
}
const int N = 1e6 + 5;
int n, m;
char s[N];
Z<> f[N];
int tp;
pair<int, int> stk[N];
int c0[N];
int tr[N][2];
bool hav1[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> (s + 1);
  n = strlen(s + 1);
  int pr = 1, sf = n;
  while (pr <= n && s[pr] == '0') pr++;
  while (sf >= 1 && s[sf] == '0') sf--;
  if (pr > n) {
    cout << n << '\n';
    return 0;
  }
  for (int i = pr; i <= sf; i++) {
    s[i - pr + 1] = s[i];
  }
  s[sf + 2 - pr] = 0;
  int m = sf - pr + 1;
  sf = n - sf + 1;
  n = m;
  tr[n + 1][1] = n + 1;
  int p1 = n + 1;
  for (int i = n; ~i; i--) {
    tr[i][1] = p1;
    if (s[i] == '1') {
      p1 = i;
    }
  }
  stk[tp = 0] = pair<int, int>(n + 1, n + 10);
  vector<pair<int, int> > s0;
  for (int i = 1, j; i <= n; i = j) {
    if (s[i] == '0') {
      j = i;
      while (j <= n && s[j] == '0') j++;
      s0.emplace_back(i, j - 1);
    } else {
      j = i + 1;
    }
  }
  reverse(s0.begin(), s0.end());
  for (auto seg : s0) {
    int l = seg.first;
    int r = seg.second;
    for (int i = l; i < r; i++) {
      tr[i][0] = i + 1;
    }
    int len = r - l + 1;
    while (stk[tp].second <= len) tp--;
    tr[r][0] = min(stk[tp].first + len, n + 1);
    stk[++tp] = pair<int, int>(l, len);
  }
  int p0 = n + 1;
  for (int i = n; ~i; i--) {
    if (s[i] == '0') {
      p0 = i;
    } else {
      tr[i][0] = p0;
    }
  }
  tr[0][0] = n + 1;
  f[0] = 1;
  for (int i = 0; i < n; i++) {
    f[tr[i][0]] += f[i];
    f[tr[i][1]] += f[i];
  }
  Z<> ans = 0;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '1') {
      ans += f[i];
    }
  }
  ans *= Z<>(pr) * sf;
  cout << ans.v << '\n';
  return 0;
}
