Problem: 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.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long maxn = 1e6 + 100;
const long long mod = 1e9 + 7;
long long n, m, k, t;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long q, w, e, a, b, c;
  string s;
  cin >> s;
  n = s.length();
  vector<long long> A;
  long long frst = 0;
  bool found = 0;
  long long cur = 0;
  for (q = 0; q < n; q++) {
    if (s[q] == '0') {
      cur++;
    } else {
      if (!found) {
        found = 1;
        frst = cur + 1;
      } else {
        A.push_back(cur);
      }
      cur = 0;
    }
  }
  long long last = 0;
  if (!found) {
    frst = cur + 1;
  } else {
    frst *= (cur + 1);
    frst %= mod;
  }
  if (A.empty()) {
    if (!found) {
      cout << frst - 1 << endl;
    } else {
      cout << frst << endl;
    }
    return 0;
  }
  vector<vector<long long>> D(A.size());
  vector<vector<long long>> I(A.size());
  vector<long long> S(A.size());
  S.push_back(0);
  S.push_back(0);
  for (q = 0; q < A.size(); q++) {
    D[q].resize(A[q] + 1);
    I[q].resize(A[q] + 1);
  }
  set<pair<long long, long long>> S1;
  for (q = 0; q < A.size(); q++) {
    while (!S1.empty()) {
      pair<long long, long long> p = (*S1.begin());
      long long i = p.second;
      if (p.first > A[q]) {
        break;
      }
      S1.erase(S1.begin());
      I[i][p.first] = q;
    }
    for (w = 0; w <= A[q]; w++) {
      S1.insert(make_pair(w, q));
    }
  }
  while (!S1.empty()) {
    pair<long long, long long> p = (*S1.begin());
    S1.erase(S1.begin());
    long long i = p.second;
    I[i][p.first] = A.size();
  }
  for (q = 0; q <= A.back(); q++) {
    D.back()[q] = 1;
    S[D.size() - 1] += 1;
  }
  for (q = (long long)D.size() - 2; q >= 0; q--) {
    S[q] += S[q + 1];
    S[q] %= mod;
    for (e = 0; e <= A[q]; e++) {
      long long i = I[q][e];
      D[q][e] = 0;
      if (i == A.size()) {
        D[q][e] = 1;
      }
      long long dd = (S[q + 1] - S[i + 1] + mod * mod) % mod;
      D[q][e] += dd;
      D[q][e] %= mod;
      S[q] += D[q][e];
      S[q] %= mod;
    }
  }
  long long ans = 1;
  for (q = 0; q < A.size(); q++) {
    for (w = 0; w <= A[q]; w++) {
      ans += D[q][w];
      ans %= mod;
    }
  }
  cout << ans * (frst) % mod;
  return 0;
}