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;
const int INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f3f3f3f3f3f3fll;
const long long M = 1e9 + 7;
const long long maxn = 1e6 + 107;
const double pi = acos(-1.0);
const double eps = 0.0000000001;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
template <typename T>
inline void pr2(T x, int k = 64) {
  long long i;
  for (i = 0; i < k; i++) fprintf(stderr, "%d", (x >> i) & 1);
  putchar(' ');
}
template <typename T>
inline void add_(T &A, int B, long long MOD = M) {
  A += B;
  (A >= MOD) && (A -= MOD);
}
template <typename T>
inline void mul_(T &A, long long B, long long MOD = M) {
  A = (A * B) % MOD;
}
template <typename T>
inline void mod_(T &A, long long MOD = M) {
  A %= MOD;
  A += MOD;
  A %= MOD;
}
template <typename T>
inline void max_(T &A, T B) {
  (A < B) && (A = B);
}
template <typename T>
inline void min_(T &A, T B) {
  (A > B) && (A = B);
}
template <typename T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
inline long long powMM(long long a, long long b, long long mod = M) {
  long long ret = 1;
  for (; b; b >>= 1ll, a = a * a % mod)
    if (b & 1) ret = ret * a % mod;
  return ret;
}
int startTime;
void startTimer() { startTime = clock(); }
void printTimer() {
  fprintf(stderr, "/--- Time: %ld milliseconds ---/\n", clock() - startTime);
}
const int mod = 1e9 + 7;
struct mint {
  long long x;
  mint() : x(0) {}
  mint(long long x) : x((x % mod + mod) % mod) {}
  mint &fix() {
    x = (x % mod + mod) % mod;
    return *this;
  }
  mint operator-() const { return mint(0) - *this; }
  mint operator~() const { return mint(1) / *this; }
  mint &operator+=(const mint &a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint &operator-=(const mint &a) {
    if ((x += mod - a.x) >= mod) x -= mod;
    return *this;
  }
  mint &operator*=(const mint &a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint &operator/=(const mint &a) {
    (x *= a.pow(mod - 2).x) %= mod;
    return *this;
  }
  mint operator+(const mint &a) const { return mint(*this) += a; }
  mint operator-(const mint &a) const { return mint(*this) -= a; }
  mint operator*(const mint &a) const { return mint(*this) *= a; }
  mint operator/(const mint &a) const { return mint(*this) /= a; }
  mint pow(long long t) const {
    if (!t) return 1;
    mint res = pow(t / 2);
    res *= res;
    return (t & 1) ? res * x : res;
  }
  bool operator<(const mint &a) const { return x < a.x; }
  bool operator==(const mint &a) const { return x == a.x; }
};
int bruteforce(string s) {
  set<string> S, T;
  S.insert("");
  for (auto c : s) {
    for (auto str : S) {
      if (str.length() == 0)
        T.insert(str + c);
      else {
        if (c == '0') {
          T.insert(str);
          T.insert(str + '0');
        }
        if (c == '1') {
          T.insert(str + '1');
          *str.rbegin() = '1';
          T.insert(str);
        }
      }
    }
    S.swap(T);
    set<string>().swap(T);
  }
  printf("%d\n", (int)T.size());
  return T.size();
}
mint val_kzero[maxn], to_next[maxn];
mint dp[maxn];
char str[maxn];
int main() {
  scanf("%s", str + 1);
  int n = strlen(str + 1), i;
  for (i = 1; i <= n; i++)
    if (str[i] == '1') break;
  if (i == n + 1) return 0 * printf("%d ", n);
  int noww = i - 1;
  n -= noww;
  for (i = 1; i <= n; i++) str[i] = str[i + noww];
  int count = 0;
  to_next[0] = mint(1);
  for (i = 1; i <= n; i++) {
    if (str[i] == '1') {
      count = 0;
      dp[i] = to_next[count];
      to_next[0] = dp[i];
      to_next[1] += dp[i];
    } else {
      count++;
      dp[i] = to_next[count];
      to_next[count] = mint(0);
      to_next[count + 1] += dp[i];
      to_next[0] += dp[i];
    }
    val_kzero[count] += dp[i];
  }
  mint ans(0);
  for (i = 0; i <= count; i++) ans += val_kzero[i];
  printf("%lld\n", ans.x * (noww + 1) % M);
}