We have a string of letters 'a' and 'b'. We want to perform some operations on it. On each step we choose one of substrings "ab" in the string and replace it with the string "bba". If we have no "ab" as a substring, our job is done. Print the minimum number of steps we should perform to make our job done modulo 109 + 7.

The string "ab" appears as a substring if there is a letter 'b' right after the letter 'a' somewhere in the string.

Input

The first line contains the initial string consisting of letters 'a' and 'b' only with length from 1 to 106.

Output

Print the minimum number of steps modulo 109 + 7.

Examples

Input

ab


Output

1


Input

aab


Output

3

Note

The first example: "ab"  →  "bba".

The second example: "aab"  →  "abba"  →  "bbaba"  →  "bbbbaa".
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1e18;
const long long mod = 1000000007;
long long inv[10000100];
long long FactorialInv[10000100];
long long Factorial[10000100];
long long beki(long long a, long long b) {
  a %= mod;
  if (b == 0) {
    return 1;
  }
  long long ans = beki(a, b / 2);
  ans = ans * ans % mod;
  if (b % 2 == 1) {
    ans = ans * a % mod;
  }
  return ans;
}
void init_combination() {
  const int MAX = 10000002;
  Factorial[0] = 1;
  inv[0] = 1;
  for (int i = 1; i <= MAX; i++) {
    Factorial[i] = Factorial[i - 1] * i % mod;
  }
  FactorialInv[MAX] = beki(Factorial[MAX], mod - 2);
  for (long long i = MAX - 1; i >= 0; i--) {
    FactorialInv[i] = FactorialInv[i + 1] * (i + 1) % mod;
  }
  for (int i = 1; i <= MAX; i++) {
    inv[i] = FactorialInv[i] * Factorial[i - 1] % mod;
  }
}
long long combination(long long a, long long b) {
  if ((a == b) || (b == 0)) {
    return 1;
  }
  if (a < b) return 0;
  long long ans = Factorial[a] * FactorialInv[b] % mod;
  ans = ans * FactorialInv[a - b] % mod;
  return ans;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string S;
  cin >> S;
  long long anum = 0;
  long long ans = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == 'a')
      anum++;
    else
      ans += beki(2, anum) - 1;
    ans %= mod;
  }
  cout << ans << "\n";
  return 0;
}
