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;
int add(long long a, long long b) {
  return ((a % 1000000007) + (b % 1000000007)) % 1000000007;
}
int subtract(long long a, long long b) {
  return ((a % 1000000007) - (b % 1000000007)) % 1000000007;
}
int mult(long long a, long long b) {
  return ((a % 1000000007) * (b % 1000000007)) % 1000000007;
}
int add1(long long a, long long b) {
  return ((a % 998244353) + (b % 998244353)) % 998244353;
}
int subtract1(long long a, long long b) {
  return ((a % 998244353) - (b % 998244353)) % 998244353;
}
int mult1(long long a, long long b) {
  return ((a % 998244353) * (b % 998244353)) % 998244353;
}
const int maxn = 50000;
long long int binmodwithMOD1(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = mult1(res, a) % 998244353;
    a = mult1(a, a) % 998244353;
    b >>= 1;
  }
  return res;
}
long long int binmodwithMOD(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = mult(res, a) % 1000000007;
    a = mult(a, a) % 1000000007;
    b >>= 1;
  }
  return res;
}
long long int binmodwithoutMOD1orMOD2(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int inverse(long long int n) {
  return binmodwithMOD(n, 1000000007 - 2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  long long int ans = 0;
  long long int pow = 0;
  long long int c = 0;
  for (long long int i = (long long int)s.length() - 1; i >= 0; i--) {
    if (s[i] == 'b')
      c++;
    else {
      ans = add(ans, c);
      c = mult(c, 2);
    }
  }
  cout << ans << endl;
  return 0;
}
