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>
using namespace std;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(int64_t &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const int64_t &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.first);
  putchar(' ');
  _W(x.second);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
int MOD = 1e9 + 7;
void ADD(long long &x, long long v) {
  x = (x + v) % MOD;
  if (x < 0) x += MOD;
}
const int SIZE = 1 << 20;
char s[SIZE];
struct BIT {
  int _n;
  long long _d[SIZE];
  void init(int __n) {
    _n = __n;
    memset(_d, 0, sizeof(long long) * (_n + 1));
  }
  void ins(int x, long long v) {
    for (; x <= _n; x += x & -x) ADD(_d[x], v);
  }
  long long qq(int x) {
    long long res = 0;
    for (; x; x -= x & -x) ADD(res, _d[x]);
    return res;
  }
} bit;
long long dp1;
long long lat_dp[SIZE];
void solve() {
  scanf("%s", (s));
  int n = strlen(s);
  bit.init(SIZE - 1);
  dp1 = 0;
  if (count(s, s + n, '0') == n) {
    W(n);
    return;
  }
  int first_zero_len = 0;
  int last_zero_pos = -1;
  long long an = 0;
  for (int i = 0, j; i < n; i = j) {
    if (s[i] == '1') {
      j = i + 1;
      long long v = bit.qq(SIZE - 1);
      dp1 = (dp1 + v + 1) % MOD;
      ;
    } else {
      int k;
      for (k = i; k < n && s[k] == '0'; k++)
        ;
      for (j = i; j < n && s[j] == '0'; j++) {
        if (!i) {
          bit.ins(j - i + 1, 1);
          lat_dp[j - i + 1] = 1;
          first_zero_len = j - i + 1;
        } else {
          long long v = (bit.qq(j - i + 1) - bit.qq(j - i)) % MOD;
          if (v < 0) v += MOD;
          long long v2 = dp1;
          if (k == n) ADD(an, v2);
          if (j - i + 1 <= first_zero_len) v2++;
          bit.ins(j - i + 1, v2 - v);
          ;
        }
      }
      last_zero_pos = i;
    }
  }
  ADD(an, dp1);
  ADD(an, 0);
  W(an);
}
int main() {
  solve();
  return 0;
}