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;
const int MAXN = 1e6 + 5;
const long long MOD = 1e9 + 7;
long long dp[MAXN];
int main() {
  dp[0] = 0LL;
  dp[1] = 1LL;
  for (int(i) = (2); (i) < (MAXN); (i)++) {
    dp[i] = (dp[i - 1] * 2LL + 1LL) % MOD;
  }
  string s;
  cin >> s;
  int a_ctr = 0, b_ctr = 0;
  long long res = 0;
  for (int(i) = (0); (i) < (s.length()); (i)++) {
    if (s[i] == 'a') {
      ++a_ctr;
    } else {
      res = (res + dp[a_ctr]) % MOD;
    }
  }
  cout << res;
  return 0;
}
