aaaaabb
 aabaaaa
 babbabaabbbbabwbvbhbbbaaabbabbbbbbbkabbbbabaaabbbbbbajabbaaabazbbbzbalbabbwbbaabbabacabdbabbbfaaabbb
 baaahbbbba
 ababavvvv
 abnxabbaab
 krflnzhter
 amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaababbabbbb
 babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab

5
 14
 42467327
 7
 7
 11
 0
 98718509
 813881762

#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 1000;
const long long INFINF = 900372036851194844;
const int INF = 1e9 + 7;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
void prtf() {}
template <typename Arg1, typename... Args>
void prtf(const Arg1& arg1, const Args&... args) {
  cout << arg1;
  prtf(args...);
  exit(0);
}
const int mod = 1e9 + 7;
int main() {
  string s;
  int n, fq = 1, block = 0;
  cin >> s;
  for (int i = 0; i < s.length(); ++i)
    if (s[i] != 'a' && s[i] != 'b') {
      s.erase(s.begin() + i);
      --i;
    }
  for (int i = 0; i < s.length(); ++i) {
    block = 0;
    while (i < s.length() && s[i] == 'a') {
      i++;
      block++;
    }
    fq = (((block + 1) % mod) * (fq % mod)) % mod;
  }
  cout << fq - 1 << "\n";
  return 0;
}
