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;
using ll = long long;
using Vi = vector<int>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
using Ppi = pair<Pii, int>;
const long long mod = 1000000007;
const int inf = 1e9 + 7;
struct Tree {
  int base = 1;
  vector<int> mini;
  Tree(int n) {
    while (base < n + 2) base *= 2;
    mini.resize(2 * base, inf);
  }
  void insert(int a, int c) {
    a += base;
    while (a >= 1) {
      mini[a] = min(mini[a], c);
      a /= 2;
    }
  }
  int query(int a, int b) {
    a += base;
    b += base;
    int res = min(mini[a], mini[b]);
    if (a == b) return res;
    while (a / 2 != b / 2) {
      if (a % 2 == 0) res = min(res, mini[a + 1]);
      if (b % 2 == 1) res = min(res, mini[b - 1]);
      a /= 2;
      b /= 2;
    }
    return res;
  }
};
string s;
int n;
const int maxS = 1000011;
long long dp[maxS];
long long dp2[maxS];
void solve() {
  cin >> s;
  n = int((s).size());
  vector<Pii> V;
  Tree tree(1e6 + 10);
  for (int b = 0; b < n;) {
    int e = b;
    while (e < n && s[b] == s[e]) {
      e++;
    }
    V.push_back({s[b] - '0', e - b});
    b = e;
  }
  int k = int((V).size());
  k--;
  int add = 0;
  for (int i = k; i >= 0; i--) {
    if (V[i].first == 1) {
      dp[i] = V[i].second * (dp[i + 1] + 1 + add) + dp[i + 2];
      dp[i] %= mod;
    }
    if (V[i].first == 0) {
      if (i == k) add = V[i].second;
      dp[i] = V[i].second * dp[i + 1];
      dp[i] %= mod;
      int l1 = V[i].second;
      tree.insert(l1, i);
      int prev = tree.query(l1 + 1, 1e6 + 1);
      if (prev == inf) continue;
      int l2 = V[prev].second;
      dp2[i] = (l2 - l1) * dp[prev + 1] + dp2[prev];
      dp2[i] %= mod;
      dp[i] += dp2[i];
      dp[i] %= mod;
    }
  }
  if (k == 0) {
    cout << dp[0] + add << '\n';
    return;
  }
  if (V[0].first == 1) {
    cout << dp[0] << '\n';
    return;
  }
  ll res = (V[0].second + 1) * dp[1];
  res %= mod;
  cout << res << '\n';
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(18);
  int z = 1;
  for (int i = 0; i < z; i++) {
    solve();
  }
  return 0;
}
