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;
const int max_n = 2e6 + 10, inf = 1000111222;
const int md = 1e9 + 7;
int dp[max_n];
int get_ans(string s) {
  if (s == "1") {
    return 1;
  }
  s.pop_back();
  vector<int> kek;
  for (auto i : s) {
    if (i == '1') {
      kek.push_back(0);
    } else {
      kek.back()++;
    }
  }
  dp[(int)(kek.size())] = 1;
  vector<int> poses;
  int sum_of_poses = 0;
  for (int i = (int)(kek.size()) - 1; i >= 0; i--) {
    dp[i] = (dp[i + 1] + 1);
    if (dp[i] >= md) {
      dp[i] -= md;
    }
    while (!poses.empty() && kek[poses.back()] <= kek[i]) {
      if ((int)(poses.size()) >= 2) {
        sum_of_poses -= 1ll *
                        (kek[poses[(int)(poses.size()) - 2]] -
                         kek[poses[(int)(poses.size()) - 1]]) *
                        dp[poses[(int)(poses.size()) - 2] + 1] % md;
        if (sum_of_poses < 0) {
          sum_of_poses += md;
        }
      }
      poses.pop_back();
    }
    poses.push_back(i);
    if ((int)(poses.size()) >= 2) {
      sum_of_poses += 1ll *
                      (kek[poses[(int)(poses.size()) - 2]] -
                       kek[poses[(int)(poses.size()) - 1]]) *
                      dp[poses[(int)(poses.size()) - 2] + 1] % md;
      if (sum_of_poses >= md) {
        sum_of_poses -= md;
      }
    }
    dp[i] = (dp[i] + sum_of_poses);
    if (dp[i] >= md) {
      dp[i] -= md;
    }
    dp[i] = (dp[i] + 1ll * kek[i] * dp[i + 1] % md);
    if (dp[i] >= md) {
      dp[i] -= md;
    }
  }
  return dp[0];
}
int main() {
  string s;
  cin >> s;
  if (*max_element(s.begin(), s.end()) == '0') {
    cout << (int)(s.size()) << "\n";
    return 0;
  }
  int kf1 = 1;
  while (s.back() == '0') {
    kf1++;
    s.pop_back();
  }
  reverse(s.begin(), s.end());
  int kf2 = 1;
  while (s.back() == '0') {
    kf2++;
    s.pop_back();
  }
  reverse(s.begin(), s.end());
  int ans = get_ans(s);
  cout << (1ll * kf1 * ans % md) * 1ll * kf2 % md << "\n";
}
